Tip 1 : Be very clear with your project explaination.
Tip 2 : Also try to cover all the CS core subjects explaination clearly.
Tip 1 : Make it clean with appropriate kowledge.
Tip 2 : Provide true information and avoid telling lie in which You are not sure.
It was morning time and from 10:00 am . It happened via the google meet online process and it was very smooth onboarding . Interviewer was very friendly kind of nature . And it went really well.



We have a linked list 1->2->3->4->5->6->7 and so on. You are supposed to swap pairs of a linked list like swap (1,2), (3,4), (5,6), and so on.
1. You may not modify the data in the list’s nodes; only nodes themselves may be changed. Because imagine a case where a node contains many fields, so there will be too much unnecessary swap.
2. If a pair of a node does not exist, then leave the node as it is.
class Solution
{
Node first= null; // store 1st violated number
Node middle=null; // 1st number adjacent number
Node second=null; // store 2nd violated number
Node prev=new Node(Integer.MIN_VALUE); // use for comparison with it's current root node
public void inorder(Node root){
if(root==null){
return;
}
// itterate left subtree
inorder(root.left);
// checking if previous element is breaking the ascending order sequence
if(prev.data > root.data){
// If this is first violation, mark these two nodes as
// 'first' and 'middle'
if(first == null){
first=prev;
middle=root;
}
// If this is second violation, mark this node as second
else{
second=root;
}
}
// Mark this node as previous, for the comparison purpose
prev=root;
// itterate right subtree
inorder(root.right);
}
//Function to fix a given BST where two nodes are swapped.
public Node correctBST(Node root)
{
//code here.
inorder(root);
if(second != null){
int temp=first.data;
first.data=second.data;
second.data=temp;
}
else{
int temp=first.data;
first.data=middle.data;
middle.data=temp;
}
return root;
}
}
It was again the morning session and the interviewer was very supportive in nature and gave me the hint too to think the approach and finally i came up the solution which he was expecting.



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?
Node* curr = head;
Node* prev = NULL;
while(curr != NULL){
Node* next = curr->next;
curr->next=prev;
prev=curr;
curr=next;
}
return prev;
It was late evening and happened in a very smooth way. Also the interviewer asked me about my family background , education background check , and also few of the HR question with respect of loyalty towards the organisation.
What are Acid Properties?
What do you understand by Normalisation?
Explain 1NF, 2NF, 3NF.
What does ER diagram signify?
Tip 1 : Try to give answer with the real life examples always.
Tip 2 : Give answers in your language and avoid the bookish language

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?