Tip 1: Start giving contests on online coding platforms as soon as you get a basic understanding of DSA.
Tip 2: Keep studying CS fundamentals from the very beginning.
Tip 3: Try solving low-level design problems as well.
Tip 1 : Maintain a good cgpa.
Tip 2 : Have at least 3 projects in your resume.



Use zero-based indexing for the nodes.
The tree is always rooted at 0.
Simple BFS worked



Input: ‘n’ = 7
Output: 2
Explanation:
The square root of the number 7 lies between 2 and 3, so the floor value is 2.
So he asked me to explain all approaches from brute force to the optimal solution, which he expected me to do in O(log n), and to use different methods for each implementation (different methods in the same code).



I solved it using backtracking.



Two or more workers may split simultaneously so that the cost would be ‘SPLIT’ at that time.



Input: Let the binary be as shown in the figure:
Output: Linked List: 15 -> 40 -> 62 -> 10 -> 20 -> NULL
Explanation: As shown in the figure, the right child of every node points to the next node, while the left node points to null.
Also, the nodes are in the same order as the pre-order traversal of the binary tree.
The root node of the tree is 1
Level 2 :
Left child of 1 = 2
Right child of 1 = 3
Level 3 :
Left child of 2 = 4
Right child of 2 = null (-1)
Left child of 3 = 5
Right child of 3 = 6
Level 4 :
Left child of 4 = null (-1)
Right child of 4 = 7
Left child of 5 = null (-1)
Right child of 5 = null (-1)
Left child of 6 = null (-1)
Right child of 6 = null (-1)
Level 5 :
Left child of 7 = null (-1)
Right child of 7 = null (-1)
The first not-null node(of the previous level) is treated as the parent of the first two nodes of the current level. The second not-null node (of the previous level) is treated as the parent node for the next two nodes of the current level and so on.
The input ends when all nodes at the last level are null(-1).
What are the different operating systems? Batched operating systems
Distributed operating systems
Timesharing operating systems
Multi-programmed operating systems
Real-time operating systems
Write an SQL query to fetch records that are present in one table but not in another table.
SELECT * FROM EmployeeSalary
MINUS
SELECT * FROM ManagerSalary;

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?