CS301 Assignment Solution 2017|Data Structure|Due Date 20-11-2017

Download Solution file

Your program should fulfill following requirements.

  • Create three (3) stacks, initially each stack will have three same numbers. Number of each stack should be different from other stack numbers. You can see in above diagram that initially each stack have same number but number is different from the numbers in other stacks.
  • Your program should swap values between stack in the way that after balancing the stacks. Each stack should have different number as showing in above diagram.
  • Please note that user will enter numbers into stack, not X, Y and Z.
  • User will enter a number for each stack which will be inserted 3 times in each stack.
  • You can implement stack through array or link list. It is your choice.

Leave a Reply

Your email address will not be published. Required fields are marked *