Tip 1: Prepare Data Structures and Algorithms thoroughly from popular coding platforms.
Tip 2: Add at least two CRUD-based projects to your resume.
Tip 1: Add two projects based on CRUD operations to your resume.
Tip 2: Mention all your achievements from coding platforms.
He asked me two data structures and algorithms questions and one question about my projects.



1. You can not slant the container i.e. the height of the water is equal to the minimum height of the two lines which define the container.
2. Do not print anything, you just need to return the area of the container with maximum water.

For the above Diagram, the first red marked line is formed between coordinates (2,0) and (2,10), and the second red-marked line is formed between coordinates (5,0) and (5,9). The area of water contained between these two lines is (height* width) = (5-2)* 9 = 27, which is the maximum area contained between any two lines present on the plane. So in this case, we will return 3* 9=27.
Given an array representing the heights of boundary lines of a container, the task is to find the maximum amount of water that can be stored in the container. Start by considering the first and the last element of the array, and calculate the amount of water that can be stored between these two boundaries. Store this value as the current maximum.
Now, the important question is — can there be better boundary pairs that can hold more water? There is a smart approach to find this. Initially, two pointers are placed: one at the first element (left boundary) and the other at the last element (right boundary). If the height at the left pointer is smaller than the height at the right pointer, move the left pointer one step to the right. Otherwise, move the right pointer one step to the left.
Since the width decreases with every step, this process ensures that the optimal solution is found efficiently.



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.
Start from the root node and traverse the tree.
Until we find both nodes p and q, keep storing the parent pointers in a dictionary.
Once we have found both p and q, retrieve all ancestors for node p using the parent dictionary and add them to a set called ancestors.
Next, traverse the ancestors of node q. If any ancestor of q is already present in the ancestors set, it means this is the first common ancestor between p and q (while moving upwards), and therefore, this is the Lowest Common Ancestor (LCA) node.
It was based on my SDE internship experience at Groww, which I explained to him in detail. He then asked me to create a high-level design for my projects.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which SQL clause is used to specify the conditions in a query?