Tip 1 : Keep practicing DSA questions.
Tip 2 : Technical Knowledge of Framework on which you're working
Tip 3 : Backend questions like different types of HTTP requests.
Tip 1 : Have a good story behind everything in your resume. Don't put anything not done by you.
Tip 2 : Mention work experience in detail and what all have you done there.
3 coding questions were there in the online test.



1. If ‘k’ is not present in 'arr', then print -1.
2. There are no duplicate elements present in 'arr'.
3. 'arr' can be rotated only in the right direction.
Input: 'arr' = [12, 15, 18, 2, 4] , 'k' = 2
Output: 3
Explanation:
If 'arr' = [12, 15, 18, 2, 4] and 'k' = 2, then the position at which 'k' is present in the array is 3 (0-indexed).
1. Calculate the total sum of all the elements in the array and store it in totalSum. O(n)
2. Maintain a variable leftSum and initialise it to 0.
3. Iterate over the array, add the current element to leftSum.
4. Check if leftSum = totalSum-(currentElement + leftSum)
5. If yes, this is the pivot index.
6. If not index if found return -1



If A = [3, 2, 3], and K = 2.
Then max of [3, 2] = 3 and max of [2, 3] = 3
So, the answer will be [3, 3]
If A = [3, 2, 3, 5, 1, 7] and K = 3.
Then max of [3, 2, 3] = 3
Then max of [2, 3, 5] = 5
Then max of [3, 5, 1] = 5
Then max of [5, 1, 7] = 7
So the answer will be [3, 5, 5, 7]
Can you solve the problem in O(N) time complexity and O(K) space complexity?
1. I used Deque to solve the problem.
2. q = deque()
3. q is a monotonically decreasing queue where q[0) will always be the max
4. Initialise high = 0
5. Run a while loop till high < len(array)
6. Top of queue will contain the maximum element in the array of size k.
7. Evict from queue when needed.



The attendees holding numbers from 1, 4, 3 are shown:

For the above example 1 -> 4 -> 3, 1 -> 3 -> 4 is the only correct answer, i.e nodes should be grouped sequentially. Hence, 3 -> 1 -> 4 is the wrong answer as we have to preserve the same order.
1. Use two pointer approach. Maintain two pointers, first and last.
2. Initialise first to 0 and last to n-1
3. Swap first and last elements when needed.
Interview Vector was taking the round on behalf on Spinny. It was two questions on technical knowledge and coding round.



Given a stream of data coming from an online game portal, every entry looks like this
User_id, timestamp, score
U1, 12:00pm, 2
U2, 13:00pm, 3
U1, 13:02pm, 2
U3, 14:03pm, 4
Need to figure out the sum of scores in the last one hour
Question was how will we process huge amount of data and update the sum of scores at every hour interval.
Tip 1 : I suggested Using asynchronous task to process this data and store it in the database
Tip 2 : Whenever the sum of scores is required we can query the data from the database.
Tip 3 : Above solution consisted of inaccuracies.
Tip 1 : Have technical knowledge of the frameworks you're currently using.
Tip 1 : Don't lie on your resume and have a story to support everything present there.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?