## Count ways to reach the n’th stair

There are n stairs, a person standing at the bottom wants to reach the top. The person can climb either 1 stair or 2 stairs… Read More »

There are n stairs, a person standing at the bottom wants to reach the top. The person can climb either 1 stair or 2 stairs… Read More »

Given a number n, find the smallest number that has same set of digits as n and is greater than n. If x is the… Read More »

Written Test: 10 Aptitude 30 Programming 10 CS Fundamentals There’s negative marking, plus there’s sectional cutoff, so you have to be very careful, and risky… Read More »

Morgan Stanley interview experience 1st round: (90 minutes) It was multiple choice questions round. It consists of 3 sections: 1. This section had computer fundamental… Read More »

Written Test: 10 aptitude and data interpretation questions, questions based on language of ur choice(C/C++/Java), questions on basic Computer skills. I was able to do… Read More »

Morgan Stanley campus placement for post IT analyst. 1st round – objective written test 10 questions on aptitude and analytics 30 questions on programming 10… Read More »

A sorted array is rotated at some unknown point, find the minimum element in it. Following solution assumes that all elements are distinct. Examples: Input:… Read More »

Given a singly linked list, swap kth node from beginning with kth node from end. Swapping of data is not allowed, only pointers should be… Read More »

The atoi() function takes a string (which represents an integer) as an argument and returns its value. Recommended: Please solve it on “PRACTICE” first, before… Read More »

Huffman coding is a lossless data compression algorithm. The idea is to assign variable-length codes to input characters, lengths of the assigned codes are based… Read More »

Write a function that calculates the day of the week for any particular date in the past or future. A typical application is to calculate… Read More »

Given an array that contains both positive and negative integers, find the product of the maximum product subarray. Expected Time complexity is O(n) and only… Read More »

Given an array containing only 0s and 1s, find the largest subarray which contain equal no of 0s and 1s. Expected time complexity is O(n).… Read More »

Given an array of n positive integers. Write a program to find the sum of maximum sum subsequence of the given array such that the… Read More »

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate… Read More »