Tip 1: Even if you are stuck on a problem, just give it a try. The interviewer will definitely help you.
Tip 2: Prepare Data Structures and Algorithms well. They mostly assess our problem-solving ability to find solutions for real-world problems.
Tip 3: Be confident, don't be nervous. Maintain at least two projects on your resume.
Tip 1: Mention at least 2 projects.
Tip 2: Mention the skills in which you are perfect.
Tip 3: It should neither be too long nor too short.
It was in the morning. The first round was an online coding + MCQ round. It had three sections in total to be solved in 40 minutes.



Case 1:
Suppose given array of distinct integers ‘ARR' = [10, 35] and array of integers array ‘PIECES' = [ [35], [10] ]. So, we return ‘True’ as we can form such array-like first we concatenate [10], then [35] hence it is possible to make ‘ARR’ from ‘PIECES’.
Case 2:
Suppose if the array of distinct integers ‘ARR' = [ 2, 1, 3 ] and an array of integers array ‘PIECES' = [ [ 1, 2 ], [ 3 ] ]. So we return ‘False’ as we cant form such an array because we can’t change the order of [ 1, 2 ].
Applied knapsack approach to solve this problem.



Left shift is defined as a single circular rotation on the string after which the first character becomes the last character and all other characters are shifted one index to the left.
If A = “an”, B = “can”.
After performing one left shift operation, string B becomes “anc”.
After performing two left shift operations, string B becomes “nca”.
Can you solve this in linear time and space complexity?
First, I applied the Sieve of Eratosthenes to find all prime numbers in that range, and then applied dynamic programming to find the longest subsequence.
It was conducted in the evening, around 4:30 PM to 5:30 PM. The questions were a bit difficult. They were mainly from Data Structures, and there was a total of 2 questions.



You are given ‘ARR’ = [7, 2, 6, 10, 8] and ‘M’ = 2. We split the array as [ 7, 2, 6] and [10, 8], the maximum of 7 + 2 + 6 and 10 + 8 is 18, which is the minimum possible.
First, sort the array and then apply the binary search algorithm to solve this problem.



Given ‘N’ = 4 and ‘ARR’[] = 1, 2, 3, 4.
The answer will be ‘1’ because an increasing subsequence of [1, 2, 3, 4] having length greater than 3 can be made.
Form a basic recursive formula that computes every possible solution and finds the best possible solution. We can see that the recursive solution has many overlapping sub-problems, which can be reduced in complexity using dynamic programming.
Recursive formula:
F(i, K) = { min of all values such that j < i [ max(Arr[i..j]) * (i – j + 1) – Sum(A[i…j]) ] } + F(j, K-1)
The bottom-up approach can be used to compute the values of sub-problems first and store them.
Here, dp[i][j] defines the minimum value that can be obtained if the array starts from index i and has j partitions.
So, the answer to the problem will be dp[0][K], where the array starts at 0 and has K partitions.
It was in the evening. The interviewer first asked simple questions to keep me calm, and it was a nice interaction with her. The environment she created was very interesting, making it easy to answer.
Tip 1: Research the company thoroughly.
Tip 2: Avoid any hesitation while giving your answers.
Tip 3: Try to give practical and optimized approaches that show professionalism.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?