Tip 1: Focus More on Linked List and Tree.
Tip 2: Prepare your project well.
Tip 3: Practice DSA in a regular manner.
Tip 1: Focus More on Linked List and Tree.
Tip 2: Prepare your project well.
Tip 3: Practice DSA in a regular manner.
OA was given during the evening slot at around 5 PM for a duration of 90 minutes. The platform was cocubes .



Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
Step 1: I traverse the Tree in the root, right, and left manner using recursion.
Step 2: I take a variable for level and keep updating when the level increased.
Step 3: Store all right view elements in the vector.



You have been given a non-empty grid consisting of only 0s and 1s. You have to find the number of islands in the given grid.An island is a group of 1s (representing land) connected horizontally, vertically, or diagonally. You can assume that all four edges of the grid are surrounded by 0s (representing water).
I used the DFS approach.



If two words have the same frequency then the lexicographically smallest word should come first in your answer.
Can you solve it in O(N * logK) time and O(N) extra space?
I solved this problem using a map and priority queue data structure.
It was a technical Interview round for 1 hour.



You are given two sorted linked lists. You have to merge them to produce a combined sorted linked list. You need to return the head of the final linked list.
I solved this problem using two pointer approach.



You are given a binary search tree of integers with N nodes. You are also given references to two nodes P and Q from this BST. Your task is to find the lowest common ancestor(LCA) of these two given nodes.
First I tell the brute force approach after that Interviewer asked optimized approach. I was able to answer the optimized solution and then write pseudo code in google doc.
What is the ACID in DBMS?
What is Deadlock and how to handle Deadlock?

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?