Tip 1 : Learn basic data structures like list, deque, tree and algorithms like sorting, Binary search, Recursion and others basics very deeply because you will find their implementations in every questions. You can solve 90 percent of the interview question using these basic DSA concepts only (may be in brute- force way).
Tip 2 : Don't jump on doing competitive programming directly. First learn the basics of DSA then solve easy questions first then start doing CP.
Tip 3 : Practice as many questions as you can (minimum 200 questions). Solve at least four questions on each concept then you will never forget them.
Tip 4 : I f you are good in CP then doing some easy projects will also get you cracking good companies but if you are not much into problem solving and CP then do at least two very good, impactful projects. Try to do projects which have some unique problem statements.
Tip 1: Mention your experiences at the top followed by your projects then your education.
Tip 2: One page resume is the best.
Two Leetcode medium-level questions.
- Topics were Binary trees, BFS/DFS.
- Solved both of them.



You may assume that given ‘X’ and ‘Y’ definitely exist in the given binary tree.
For the given binary tree

LCA of ‘X’ and ‘Y’ is highlighted in yellow colour.
Use LCA to find distance between two nodes.



In the given linked list, there is a cycle, hence we return true.

- 1 Leetcode hard-level question
- The question was based on graphs and algorithms.
- The constraint about this round was I needed to pass all the 50 TCs to clear it and I was able to solve it.



In the below graph, there exists a cycle between vertex 1, 2 and 3.

1. There are no parallel edges between two vertices.
2. There are no self-loops(an edge connecting the vertex to itself) in the graph.
3. The graph can be disconnected.
Input: N = 3 , Edges = [[1, 2], [2, 3], [1, 3]].
Output: Yes
Explanation : There are a total of 3 vertices in the graph. There is an edge between vertex 1 and 2, vertex 2 and 3 and vertex 1 and 3. So, there exists a cycle in the graph.
- Brief Introduction of myself.
- OOPS concepts with a real-life example.
- Asked me to implement Trie (Insert & Search functions)
- A brief discussion on all Graph Path Finding Algos.



Operation 1 - insert(word) - To insert a string WORD in the Trie.
Operation 2- search(word) - To check if a string WORD is present in Trie or not.
Operation 3- startsWith(word) - To check if there is a string that has the prefix WORD.

The above figure is the representation of a Trie. New words that are added are inserted as the children of the root node.
Alphabets are added in the top to bottom fashion in parent to children hierarchy. Alphabets that are highlighted with blue circles are the end nodes that mark the ending of a word in the Trie.
Type = ["insert", "search"], Query = ["coding", "coding].
We return ["null", "true"] as coding is present in the trie after 1st operation.



Interface vs abstract class, heap memory vs stack memory, collections, Exception Handling etc.
Difference between Merge Sort vs Quick Sort.
- Brief Introduction of myself, my current location, my education details
- Information about my current Organisation
- Why do I want to join Samsung?
- My strengths & weaknesses

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?