Tip 1 : Good Knowledge of Time and Space Complexity
Tip 2 : Practice DSA Questions
Tip 1 : Have some projects on your resume.
Tip 2 : Do not put false things on your resume.
Timing - It was an online assessment, and can be given at any time based on your convenience in under 1 week's time.
Environment - CodeSignal provides indentation and hints for keywords in any language you choose like C, C++ , Java


'P' is a permutation of (0, 1, 2, ..., 2 ^ (N - 1)).
The first element of the array 'P' is 'X', i.e., P[0] = X.
Adjacent elements of 'P' (i.e., P[i] and P[i + 1]) differ by only 1 bit in their binary representation.
The first and the last element (i.e., P[0] and P[2^N -1]) are also considered as adjacent elements.
For N = 2, [0,1,2,3], [0,2,3,1], [1,2,3,0] are some of the valid permutations but [0,0,1,2], [1,2,3,4], [1,1,1,3] are not.
It is guaranteed that an array 'P' always exits with the given requirements.
Key idea that paused me initially - digits/numbers are not actually concatenated as strings, it must be exact match between array element and pieces element. E.g. we cannot do [2, 32, 15] to [23, 215]. When I realized it solution flows naturally.
We need to be able to lookup elements of pieces quickly - hash map. We put whole array from pieces as a value, and first element of that array as a key. Because all numbers are unique it will work. When we find the match for first element then the rest of elements in pieces element should match elements from array exactly. To track elements of array we keep global index variable. If we reached the end of array that means all elements are matched from pieces.



Given ‘N’ = 2
On Day 1 = 1
On Day 2 = 2
Total Amount = 1 + 2 = 3.
Therefore the answer is 3.
The question was simple just follow the instructions given in the question. In order to handle corner cases try answering questions like How do you determine if a transaction will fail? and then Simply apply the operations if the transaction is valid.
The interviewer was a Senior Software Engineer at Phonepe



You can’t sell without buying first.
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
Step 1) Declare a buy variable to store the buy cost and max_profit to store the maximum profit.
Step 2) Initialize the buy variable to first element of profit array.
Step 3) Iterate over the prices array and check if the current price is miminum or not.
Step 4) If the current price is minimum then buy on this ith day.
Step 5) If the current price is greater then previous buy then make profit from it and maximise the max_profit.
Step 6) Finally return the max_profit.


Step 1) Let the given element be x, create two variable i = 0, j = n-1 as index of row and column
Step 2) Run a loop until i = n
Step 3) Check if the current element is greater than x then decrease the count of j. Exclude the current column.
Step 4) Check if the current element is less than x then increase the count of i. Exclude the current row.
Step 5) If the element is equal, then print the position and end.
The interviewer was Head of Engineering at Phonepe
Designing e-commerce websites like Flipkart or Amazon
Tip 1 : Ask clarifying questions
Tip 2 : Be thorough
Tip 3 : clearly define the who and the what of your solution
What is a Thread?
What are the differences between process and thread?
What is Thrashing?
Tip 1 : Read Galvin for OS thoroughly.

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