Tip 1 : Do practice a lot of data structures questions as mostly questions in interviews are based on them. Also, do prepare for projects mentioned in your resume and skills which you have mentioned. clear.
Tip 2 : Coding ninjas has a big hand in making my interview clear as I have taken a course from the coding Ninjas which helped me a lot to make my concepts
Tip 1 : Keep it short and crisp.
Tip 2 : Go through it properly before the interview. Make sure that you haven't put anything in it that can cause you problems during the interview.



If the given array is [1,2,3] then the answer would be 2. One of the ways to make all the elements of the given array equal is by adding 1 to the array element with value 1 and subtracting 1 from the array element with value 3. So that final array would become [2,2,2].



If there are any duplicates in the given array we will count only one of them in the consecutive sequence.
For the given 'ARR' [9,5,4,9,10,10,6].
Output = 3
The longest consecutive sequence is [4,5,6].
Can you solve this in O(N) time and O(N) space complexity?



1.The end will be a minimum possible coordinate, greater than the maximum element in the given array of elements.
2.Avoiding obstacles means that we cannot stop at the given coordinates.
3.The elements may not be in sorted order.
4.The last jump can be of any unit, provided it crosses the endpoint.
s1- I first made an array in the main function that will contain the number of prime numbers less than or equal to the index value of the array and passed into my called function.
s2- This will give me the a value for each test case. Then, int the called function I applied dynamic programming. I created a dp array and initialized all values to max integer (dp[0] = 0).
s3- For each index i, i put dp[i+1] if (i=(r1/r2)) equal to minimum of(dp[i]+1, dp[i+1/i+2/i+a]). Then I returned dp[n-1] if it wasnt equal to max integer otherwise i returned "No way!".



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.
s1- first line of input contains a single integer 'T', representing the number of test cases.
s2- The first line of input contains an integer 'N' representing the length of the array.
s3- return an integer in a single line i.e. the minimum number of operations required to make all the elements of the array equal.



If the given string is: STR = "abcde". You have to print the string "edcba".
Try to solve the problem in O(1) space complexity.
s1- He asked me to write a function to reverse a string of size n. In this question I defined my string ans="" , then iterated i from n-1 to 0 and concatenated Character.toString(s.charAt(i)) to my ans and then returned ans. He followed up the question. He said “If I remove ' ”="" ' in string ans line then what will happen. I answered that it will give me a compilation error that the variable "ans" is not initialized.
s2- Then he asked what it means that a string is immutable.
What are semaphores?
What is virtual memory?
Tip 1 : Read Galvin for OS thoroughly.
Tip 2 : Do practice for SQL queries.
1. Tell me about yourself.
2. Why are you interested in this position?
3. Why are you leaving your current job?
4. Can you describe a work or school instance in which you messed up?
5. Tell me about a time when you experienced conflict with a co-worker and how you dealt with it. ?

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?