Tip 1 : Prepare fundamental theory well
Tip 2 : Prepare Easy and medium level questions
Tip 3 : Go through you resume well
Tip 1 : Make your resume relevant
Tip 2 : Mention projects



'S' = "{}()".
There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
So the 'S' is Balanced.
Stack st = new Stack<>();
for(int i=0; i if(!st.isEmpty() && s.charAt(i)==')' && st.peek()=='(') st.pop();
else if(!st.isEmpty() && s.charAt(i)=='}' && st.peek()=='{') st.pop();
else if(!st.isEmpty() && s.charAt(i)==']' && st.peek()=='[') st.pop();
else st.push(s.charAt(i));
}
return st.isEmpty();



The given linked lists may or may not be null.
If the first list is: 1 -> 4 -> 5 -> NULL and the second list is: 2 -> 3 -> 5 -> NULL
The final list would be: 1 -> 2 -> 3 -> 4 -> 5 -> 5 -> NULL
ListNode ans = new ListNode(0);
public ListNode mergeTwoLists(ListNode list1, ListNode list2) {
if(list1 == null) return list2;
if(list2 == null) return list1;
if(list1.val<=list2.val){
list1.next = mergeTwoLists(list1.next, list2);
return list1;
} else{
list2.next = mergeTwoLists(list1, list2.next);
return list2;
}
}
