Tip 1 : Practice Atleast 250 Questions on GFG/Leetcode
Tip 2 : For DSA questions in interviews, start explaining from the brute force approach and then move to the optimal one. Convey your thought process to the interviewers, so that they can help you out if you get stuck.
Tip 3 : Do not write anything that you are not confident of in resume
Tip 4 : Do atleast 2 projects
Tip 1: Try to include at least one development project in your resume.
Tip 2: Interviewer will ask anything from your resume so be prepared for it.
Tip 3 : Don't mention some random projects which you are not sure about or copied from Google or somewhere else.
There were a total of four coding questions.





N = 5
ARR = [ 3, -6, 7, -7, 0 ]
Out of all pairs, (-7,-6) have a difference of ‘1’, and no other pair has less difference. So ‘ANS’ is ‘1’.
sort(arr);
diff = INT_MAX
ans = 1;
for(int i = 1; i < arr.length; i++){
int curr_diff = abs(arr[i] - arr[i-1]);
if(curr_diff <= diff) {
diff = curr_diff;
ans = i;
}
}
print(arr[i-1]+" "+arr[i]);



i) Swap any two rows.
ii) Swap any two columns.
A chessboard matrix is a binary matrix where there are no two 0’s and no two 1’s who are adjacent to each other.
[ [1, 0], [0, 1] ] and [ [0, 1], [1, 0] ] are chessboard matrix whereas [ [1,0], [1, 1] ] isn’t.


Interviewer asked me 2 coding problems, DBMS Queries and some puzzles



The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Can you solve this problem in O(N) time and O(1) space complexity?



'S' = "{}()".
There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
So the 'S' is Balanced.
Second Highest Salary in the given table(Practice)
Swap Salary (Practice)
How do we measure forty-five minutes using two identical wires, each of which takes an hour to burn? We have matchsticks with us. The wires burn non-uniformly. So, for example, the two halves of wire might burn in 10 minutes and 50 minutes, respectively.
1. What are your strengths and weaknesses?
2. Are you okay with relocating?
3. Why do you want to join us?

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