CS301 Assignment No 01 Solution Due Date: 20-11-2017

By | November 19, 2017
(Last Updated On: November 28, 2017)

cs301 assignment

CS301 Assignment 1 Complete Solution 2017

 

Download our Android App of Midterm Past Papers “CLICK HERE TO GET APP”

 

CS301 Assignment No 01 Solution Fall 2017

Question:   

Download our Android App of Midterm Past Papers “CLICK HERE TO GET APP”

Write a C++ program to balance three (3) stacks so the sum of numbers in each stack should be same.

cs301 assignment

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.

Download our Android App of Midterm Past Papers “CLICK HERE TO GET APP”

Sample output screen shot of program is given below

cs301 assignment

Solution Guidelines:

  1. First understand the code given in handouts about stack.
  2. Don’t allow popping if stack is empty and pushing if stack is full.

 

You can download the CS301 Data Structures Assignment 1 Solution file from here

Download our Android App of Midterm Past Papers “CLICK HERE TO GET APP”

CLICK HERE TO DOWNLOAD ASSIGNMENT FILE

Download our Android App of Midterm Past Papers “CLICK HERE TO GET APP”