Count ways to reach the nth stair using step 1, 2 or 3

The problem “Count ways to reach the nth stair using step 1, 2, or 3” states that you are standing on the ground. Now you need to reach the end of the staircase. So how many ways are there to reach the end if you can jump only 1, 2, …

Read moreCount ways to reach the nth stair using step 1, 2 or 3

Stack Permutations (Check if an array is stack permutation of other)

Problem Statement The problem “Stack Permutations (Check if an array is stack permutation of other)” states that you are given two arrays a[ ] and b[ ] of size n. All the elements of the array are unique. Create a function to check if the given array b[ ] is …

Read moreStack Permutations (Check if an array is stack permutation of other)

Mobile Numeric Keypad Problem

Problem Statement In the mobile numeric keypad problem, we consider a numeric keypad.  We need to find all number of possible numeric sequences of given length such that you are only allowed to press buttons which are top, down, left, and right of the current button. You are not allowed …

Read moreMobile Numeric Keypad Problem