Tip 1 - Practice Atleast 250 Questions
Tip 2 - Do atleast 2 projects
Tip 3 - Practice good number of questions for Aptitude and Quantitative reasoning
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.
There were around 5-6 coding questions. The difficulty was about easy to medium. Also there was 10 mcq DSA questions
Looping through the stack is not allowed.
You need to return a stack that is sorted in descending order.
Given stack S = 1 3 2
The output will be 3 2 1 since it is the sorted order.
The idea of the solution is to hold all values in Function Call Stack until the stack becomes empty. When the stack becomes empty, insert all held items one by one in sorted order. Here sorted order is important.
Anagrams are defined as words or names that can be formed by rearranging the letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "rasp" are anagrams.
'triangle' and 'integral'
'listen' and 'silent'
Since it is a binary problem, there is no partial marking. Marks will only be awarded if you get all the test cases correct.
The idea is very basic run a nested loop, the outer loop which will mark the starting point of the subarray of length k, the inner loop will run from the starting index to index+k, k elements from starting index and print the maximum element among these k elements.
The number of positive integers and negative integers may not be equal. In such cases, add the extra integers at the end.
For array {4, -9, -2, 6, -8}, the output will be {-9, 4, -2, 6, -8}
For array {1, 2, 3, -5}, the output will be {-5, 1, 2, 3}
The idea is to use an auxiliary array. We maintain two pointers one to leftmost or smallest element and other to rightmost or largest element. We move both pointers toward each other and alternatively copy elements at these pointers to an auxiliary array. Finally, we copy the auxiliary array back to the original array.
'arr '= [1,2,3,4,5]
'k' = 1 rotated array = [2,3,4,5,1]
'k' = 2 rotated array = [3,4,5,1,2]
'k' = 3 rotated array = [4,5,1,2,3] and so on.
leftRotate(arr[], d, n)
start
For i = 0 to i < d
Left rotate all elements of arr[] by one
end
To rotate by one, store arr[0] in a temporary variable temp, move arr[1] to arr[0], arr[2] to arr[1] …and finally temp to arr[n-1]
Let us take the same example arr[] = [1, 2, 3, 4, 5, 6, 7], d = 2
Rotate arr[] by one 2 times
We get [2, 3, 4, 5, 6, 7, 1] after first rotation and [ 3, 4, 5, 6, 7, 1, 2] after second rotation.
This round was cogitative ability round. It is a type of test that aims at measuring a student’s intellect through games. Also termed as ‘Cognify’, these games are structured in a way that evaluate your personality and aptitude abilities.
There were around 5-6 game problem , we have to solve them in 30-35 minutes. This round is an elimination round.
After this round there was English Language Test round . This round came just after I cleared 2nd round. I have to answer as many questions in 15 minutes.. The questions were of type Antonyms , Synonyms , Jumbled Sentences, Verbal Ability Questions
Shortcuts :-
In Shortcuts, I need to move the blue marble to the starred area. There are some numbers available on the track. When you move any marble, the number on the track will be added to the distance traveled. There will be some red marbles too which will act as an obstacle in the path and you have to fix them too. The aim of this task is to move blue marbles to the stars with the minimum distance traveled. There will be three categories to evaluate your performance i.e, Ok, Good and Great.
In this game, I have to fit the blocks into the given grid. You can rotate the blocks too to fix them in the grid.
In this game, there will be a target value and some balloons presented on the screen. you have to click only that balloons that result in the same value as the target. Try to hit the maximum correct balloons.
In Resemble, we need to mentally rotate the image on the left and then replicate it on the right
In Proof it, we must identify as many misspelled words and punctuation error as possible in the time provided.
This round was technical + HR round . DSA , DBMS, coding questions were asked.
Basic HR questions like about my project, about internships, why I want to join IBM . This type of questions were asked by HR
The idea is to take every interval one by one and find the number of intervals that overlap with it. Keep track of the maximum number of intervals that overlap with an interval. Finally, return the maximum value.
Follow the steps mentioned below:
Run two nested loops, the outer loop from start to end and the inner loop from i+1 to end.
For every iteration of the outer loop, find the count of intervals that intersect with the current interval.
Update the answer with the maximum count of overlap in each iteration of the outer loop.
Print the answer.
For the given input array [4, 3, 2, 1], the minimum no. of swaps required to sort the array is 2, i.e. swap index 0 with 3 and 1 with 2 to form the sorted array [1, 2, 3, 4].
This can be easily done by visualizing the problem as a graph. We will have n nodes and an edge directed from node i to node j if the element at i’th index must be present at j’th index in the sorted array.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is the output of print(type("Python"))?