Tip 1 : Prepare Data Structures and Algorithms well. They mostly check our Problem Solving ability to find the solutions for the real world problems.
Tip 2 : Be enough confident, don't be nervous. Maintain atleast 2 projects in your resume.
Tip 3 : Even if you are stuck in the problem, just give a try. The interviewer will help you definitely for sure.
Tip 1 : Have atleast 2 projects with the latest technologies.
Tip 2 : You should be able to answer each and every thing present in your resume. Don't lie in your resume.



[1, 2, 3, 4] is a strictly increasing array, while [2, 1, 4, 3] is not.
I have used the two properties of the Dynamic Programming
1) Overlapping Subproblems
2) Optimal Substructure
Considering the above two properties I was able to solve the given question within the stipulated time.
The time complexity of the above Dynamic Programming (DP) solution is O(n^2)



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').
Firstly I solved it using the brute force approach i.e., using two for loops. Using this approach only few of the cases have passsed and for the remaining it displayed time limit exceeded.
Later I used the concept of Merge Sort with which all of the remaining cases also passed.
This was held on Amazon Chime and the interview lasted for 1 hour. Firstly the interviewer asked to introduce about myself, later asked regarding the projects I have mentioned in my resume. Then started displaying the coding question. The first question is related to Strings. Given a string, find any of its permutation or anagram is a palindrome or not. The second question is Given an array of integers, find the length of the longest increasing subsequence. After solving both the questions in the optimized approach, the interviewer asked me for the 3rd question because we were still having time. The third question is Given a string with no separator, find the missing number in the string.The interviewer was very friendly.



Anagrams are defined as words or names that can be formed by rearranging the letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "rasp" are anagrams.
'triangle' and 'integral'
'listen' and 'silent'
Since it is a binary problem, there is no partial marking. Marks will only be awarded if you get all the test cases correct.
Initially I have solved it using the brute force approach i.e., generating all the permutations of the string and then finding out whether each and every permutation is either palindrome or not.
Later I was asked to optimize it. Then I have solved it using the distinct character i.e., to make a palindrome there should be few repeated character, considering all even length and odd length strings. If a string contains only unique characters, then there is no chance of being a palindrome in any of its permutation. This is how I solved this question.



[1, 2, 3, 4] is a strictly increasing array, while [2, 1, 4, 3] is not.
I have solved using the dynamic programming. I have applied two steps to solve this problem. They are
1) Overlapping Subproblems
2) Optimal Substructure
With the help of these i was able to solve the problem.



1. The string consists of only digits 0 to 9.
2. The numbers will have no more than six digits.
Initially I solved this problem using the brute force approach like considering each character and comparing it with the previous and the next character. And then checking the difference between them. Then I was asked to code the same because we are running out of time.
This was held on Amazon Chime and the interview lasted for 1 hour. Firstly the interviewer asked to introduce about myself, later asked regarding the projects I have mentioned in my resume. Then started displaying the coding question. The first question is number of islands in a matrix.



I have solved the problem easily by applying DFS() on each component. In each DFS() call, a component or a sub-graph is visited. I will then call DFS on the next un-visited component. The number of calls to DFS() gives the number of connected components. BFS can also be used.
A cell in 2D matrix can be connected to 8 neighbours. So, unlike standard DFS(), where we recursively call for all adjacent vertices, here we can recursively call for 8 neighbours only. We keep track of the visited 1s so that they are not visited again.
Time complexity: O(ROW x COL)

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?