Tip 1: Start with data structures.
Tip 2: Cover algorithm patterns based on all data structures.
Tip 3: Practice on coding platforms.
Tip 1:Keep all the projects.
Tip 2:Mention all the achievements.



1. If the value is present in the array, return its index.
2. If the value is absent, determine the index where it would be inserted in the array while maintaining the sorted order.
3. The given array has distinct integers.
4. The given array may be empty.
Input: arr = [1, 2, 4, 7], m = 6
Output: 3
Explanation: If the given array 'arr' is: [1, 2, 4, 7] and m = 6. We insert m = 6 in the array and get 'arr' as: [1, 2, 4, 6, 7]. The position of 6 is 3 (according to 0-based indexing)
The problem was based on simple logic.
Set the upper bound as the maximum integer, and the lower bound as the minimum integer in the run-time environment.
Start DFS traversal from the root node, and check whether each level follows BST rules or not.
Update the lower bound and upper bound before going down to the next level.
Once we find the violation, reject and early return False.
Otherwise, accept and return True if all tree nodes follow the BST rule.



The strings are non-empty.
The strings only contain lowercase English letters.
Used pattern matching algorithm to solve that.



For the given binary tree

The maximum width will be at the third level with the length of 3, i.e. {4, 5, 6}.
Standard tree traversal with critical thinking was enough.



1. Node ‘U’ is said to be a sibling of node ‘V’ if and only if both ‘U’ and ‘V’ have the same parent.
2. Root 1 is a sibling node.
Standard tree traversal with critical thinking was enough.



An island is a 4-directionally (North, South, East, West) connected group of 1s.
Input: 'grid' = [[1,0],
[0,1]]
Output: 3
Explanation:
We can change the 0 at (0,1) to 1 and get an island of size 3.
The problem was straightforward.



The problem was straightforward.

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