Tip 1 - Practice at least 350 Questions.
Tip 2 - Do at least 3 projects.
Tip 1: be confident.
Tip 2: have some projects on resume.
If two or more such subarrays exist, return any subarray.
Given an unsorted array `A` of size `N` that contains only positive integers, find a continuous sub-array that sums to a given number `S` and return the left and right indices (1-based indexing) of that subarray.
1. The heights of the buildings are positive.
2. Santa starts from the cell (0, 0) and he has to reach the building (N - 1, M - 1).
3. Santa cannot leave the grid at any point of time.
Given an array of N integers `arr[]`, where each element represents the maximum length of the jump that can be made forward from that position. This means if `arr[i] = x`, then we can jump any distance `y` such that `y ≤ x`. Find the minimum number of jumps required to reach the end of the array (starting from the first element). If an element is 0, then you cannot jump over that element.
1. Rightmost element is always a leader.
2. The order of elements in the return sequence must be the same as the given sequence
The given sequence is 13, 14, 3, 8, 2 .
13 Not a leader because on the right side 14 is greater than 13.
14 lt is a leader because no one greater element in the right side.
3 Not a leader because on the right side 8 are greater than 3.
8 It is a leader because no one greater element on the right side.
2 It is a leader because it is the rightmost element in a sequence.
Hence there are 3 leaders in the above sequence which are 14, 8, 2.
Given an array A of positive integers, your task is to find the leaders in the array. An element of the array is a leader if it is greater than or equal to all the elements to its right side. The rightmost element is always a leader.
If 'N' is 5 and 'K' is 3 and the array is 7, 2, 6, 1, 9
Sorting the array we get 1, 2, 6, 7, 9
Hence the 3rd smallest number is 6.
Given an array `arr[]` and an integer `K`, where `K` is smaller than the size of the array, the task is to find the Kth smallest element in the array. It is guaranteed that all array elements are distinct.
Managerial round.
1. Where do you see yourself in 5 years?
2. What are your strengths and weakness?
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How many times will the loop execute? for(int i = 0; i < 5; i++)