Tip 1: For companies like Codenation, you need to be great at competitive programming, as the online test is very difficult to crack.
Tip 2: Focus on problem solving during the final months of interview preparation.
Tip 3: Try to have at least three flagship projects in at least two different domains.
Tip 1: Keep the resume clean with a good text-to-space ratio.
Tip 2: Don't mention technologies that you have only limited knowledge of, as it can backfire if the interviewer is proficient in that technology.
The test was from 10 PM to 11:30 PM. Since we had to take the test from home, the timing was not uncomfortable for me. The test was conducted on HackerRank. Personally, I find HackerRank a better testing platform than others like AMCAT or Mettl.



1. 0-based indexing is used in the array.
2. We only care about the garden from 0 to 'N' only. So if i - 'ARR'['i'] < 0 or i + 'ARR'['i'] > 'N', you may ignore the exceeding area.
3. If some fountain covers the garden from position 'A' to position 'B', it means that the water from this fountain will spread to the whole line segment with endpoints 'A' and 'B'.



A pair ('ARR[i]', 'ARR[j]') is said to be an inversion when:
1. 'ARR[i] > 'ARR[j]'
2. 'i' < 'j'
Where 'i' and 'j' denote the indices ranging from [0, 'N').
I applied Binary search
The interview was at 12 noon, and it was a resume walk-through round. The interview was supposed to be a Google Meet call, but due to a weak internet connection on the interviewer's end, he called me directly on my phone. He had my resume open and asked me to walk him through the projects I had worked on. His main interest was in my web development project. Since the project is live, he was able to use it and was quite impressed with my work. He also discussed my tech stack and asked a few questions related to JavaScript to assess my proficiency. The questions he asked were about explaining Asynchronous Programming in JavaScript and Promises in JavaScript.



Let’s say you have an array/list [1, 3, 5, 3] and ‘X’ is 7.
We can first remove the rightmost element i.e. 3. The array becomes [1,3,5]. In the next step, we can remove the leftmost element i.e 1. The array becomes [3,5] and the sum of removed elements so far becomes 4. In the next step, we can remove the leftmost element i.e 3. The array becomes [5] and the sum of removed elements so far is 7. We have reached our target X i.e 7. Therefore the minimum number of operations to reach ‘X’ is 3.
This interview was at 10 a.m. in the morning and was conducted by an SDE 3 from the company, who had an excellent background in competitive coding. The interview started with me introducing myself.



1) A subarray is a part of the array which is contiguous (i.e. elements in the original array occupy consecutive positions) and inherently maintains the order of elements. For example, the subarrays of the array {1, 2, 3} are {1}, {1, 2}, {1, 2, 3}, {2}, {2, 3}, and {3}.
2) Bitwise OR operation takes two numbers and performs OR operation on every bit of those two numbers. For example, consider two numbers 2 and 3 their bitwise OR will be 3. Because the binary representation of 2 is 10 and the binary representation of 3 is 11. And OR of 10 and 11 will be 11 which evaluates to 3.
3) The array may contain duplicate elements.
I had read this article a few days before the interview, so I was aware of the efficient approach. However, I started by explaining the naive O(N^3) solution. The interviewer asked me to optimize the approach, so I then presented the approach I had read in the article. The interviewer asked me to code the solution, which I did.

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?