Question: 3 A ) Consider an array A [ 1 dotsn ] with size n . This array is used to implement multiple stacks of varying

3A) Consider an array A[1dotsn] with size n. This array is used to implement multiple stacks of varying
sizes s1,s2dotssk. The size of each stack is the user input. Write functions to perform the following
operations:
i) Implement PUSH operation on the stack whose number is an input from the user.
ii) Implement POP operation on the stack whose number is an input from the user.
3B) Identify and represent the graph shown in Figure Q.3B that is suitable for its traversal using DFS
technique. Write a function to traverse the graph using DFS technique and count the total number of
nodes that contain odd number as the data.
3C) Write a user defined function to copy one binary tree to another.
 3A) Consider an array A[1dotsn] with size n. This array is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!