Monthly Archive: January 2016

0

Sort the stack in ascending order

Problem : Sort the given stack into an ascending order without using recursion. Logic: Pop an item from the original stack and push it onto the sorted stack. If the poped item from the...

Tower of hanoi 0

Tower of hanoi

Problem : The Towers of Hanoi is a classic puzzle with 3 pegs and multiple disks of different sizes. The goal of the puzzle is to move all the disks from the first peg...