Tip 1 : Practice DSA questions for all topics - LinkedList, stacks, queues etc.
Tip 2 : Have a proper analysis of the DSA question before attempting it.
Tip 3 : Learn System Design.
Tip 1: The resume should be one page.
Tip 2: All achievements and important details should be highlighted.



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.






Below is the example showing the input tree and its sum tree.

I drew a few trees and asked him for the output for those examples. He asked me to provide it myself, and I did. I thought of performing a post-order traversal since we need to visit the root’s left and right children before visiting the root. In post-order traversal, we keep the sum of the root’s left and right children in a variable called sum. We then take the difference between this sum and the root’s data. If the sum is greater than the root’s data, we replace the root with the sum. Otherwise, we must distribute the root’s value to the root’s left and right children so that all three conditions are satisfied. (We can’t reduce the value at any node). He asked me to write the code for it, and I did.



insert(word) - To insert a string "word" in Trie
search(word) - To check if string "word" is present in Trie or not.
startsWith(word) - To check if there is any string in the Trie that starts with the given prefix string "word".
Type 1: To insert a string "word" in Trie.
1 word
Type 2: To check if the string "word" is present in Trie or not.
2 word
Type 3: To check if there is any string in the Trie that starts with the given prefix string "word".
3 word
I wrote a class to implement a character Trie using a vector of nodes as children. He asked me to improve on space. So, I used a HashMap to store the child nodes only if a child exists. I wrote the code for insertion and finding a word and walked him through.



I used Kadane algorithm here to find subarray with maximum sum. It is a standard question for interview.



1. Delete a character
2. Replace a character with another one
3. Insert a character
Strings don't contain spaces in between.
Firstly, I gave the interviewer, a recursive solution then he asked me to reduce complexity as it was exponential of recursive solution, so I gave him a top-down DP solution.
Introduce yourself.
What did you do in the last year to improve your knowledge?
Explain the difference between group and team. Are you a team player?
What is your ideal company or workplace?
Tip 1 : Start by telling about your education.
Tip 2 : Then tell about your technical experiences - what projects you worked on, what was your part in team.
Tip 3 : Lastly, tell that how can you be asset to the organization

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?