Tip 1: Be thorough with your resume
Tip 2: Prepare DSA very well
Tip 3: Have decent projects
Tip 1: Have decent projects on the resume
Tip 2: Try to add as many skills as possible
I had my interview in the afternoon. The interviewer was very friendly and made me feel comfortable. He asked me some generic questions like why you want to join us, etc., and then came straight to DSA.
Can you solve this using not more than O(S) extra space, where S is the sum of all elements of the given array?
First, I did the sum of all elements and checked if it was even; if odd, I returned false; else, I divided it by two and passed it in a recursive function, which checked if a subsequence exists that has a sum equal to that value. Then, I optimized it by adding 1-D DP.
pushFront(X): Inserts an element X in the front of the deque. Returns true if the element is inserted, otherwise false.
pushRear(X): Inserts an element X in the back of the deque. Returns true if the element is inserted, otherwise false.
popFront(): Pops an element from the front of the deque. Returns -1 if the deque is empty, otherwise returns the popped element.
popRear(): Pops an element from the back of the deque. Returns -1 if the deque is empty, otherwise returns the popped element.
getFront(): Returns the first element of the deque. If the deque is empty, it returns -1.
getRear(): Returns the last element of the deque. If the deque is empty, it returns -1.
isEmpty(): Returns true if the deque is empty, otherwise false.
isFull(): Returns true if the deque is full, otherwise false.
Type 1: for pushFront(X) operation.
Type 2: for pushRear(X) operation.
Type 3: for popFront() operation.
Type 4: for popRear() operation.
Type 5: for getFront() operation.
Type 6: for getRear() operation.
Type 7: for isEmpty() operation.
Type 8: for isFull() operation.
This round happened immediately afterward. The interview took my intro and went straight for the questions.
'ARR' = [3, 4, -1, 1, 5] and 'K' = 3
Output = [4, 4, 5]
Since the maximum element of the first subarray of length three ([3, 4, -1]) is 4, the maximum element of the second subarray of length three ([4, -1, 1]) is also 4 and the maximum element of the last subarray of length three ([-1, 1, 5]) is 5, so you need to return [4, 4, 5].
The HR round was the last one. I was asked to introduce myself and directly asked basic HR questions.
Why do you want to join our company?
How will you increase user retention?
Tip 1: Be Polite
Tip 2: Be genuine.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which SQL keyword removes duplicate records from a result set?