You are on page 1of 2

FAT LAB-L21+L22, DSA, 3/06/2021

 Mention algorithm (must)


 Write full C code
 Screenshots of outcome
 All in as a single pdf should be uploaded on vtop.

Total Time : 1hr 30 minutes.

[If you submit after time deadline(i.e 11:30 am) your submission wont be evaluated,; make a
pdf file and upload]

1. You have three stacks of same heights. Each stack could have different number of elements(let say
maximum six in this sample example). After making(adjusting) equal number of elements in all three
stacks with minimum removal(deleting elements from required stack/stacks), what is the heighest
number that will be avialable among all three stacks? Display that element from that stacks/ stack.

[Visual hints}
3
4
6
9
1
After deleting 3,4 from first stack
8
and 4 from the 3rd stack, we got the
below stacks, where at the top of
4 the stack1& stack3 is 6 ; i.e 6 is the
6 heighest element available among
8 all three stacks.
9

4
6
8
9
10
[This is just a sample example, you must have random inputs to the stacks with different number of
elements,however maximum height of any stack could be fixed of your choice]

2. Implement Krushkal algorithm using C programming.

You might also like