Tip 1: Practice at least 250 questions in Array and Linked List.
Tip 2: Do keep practicing Interview Experience questions from Coding Ninjas.
Tip 1: Be real about everything you have mentioned in your resume.
Tip 2: Know your projects.
Total 5 participants were present. A topic was given to present your thoughts about it.



Input: 'a' = [2, 4, 6] and 'b' = [1, 3, 5]
Output: 3.5
Explanation: The array after merging 'a' and 'b' will be { 1, 2, 3, 4, 5, 6 }. Here two medians are 3 and 4. So the median will be the average of 3 and 4, which is 3.5.
Step 1: Merge the Arrays: First, I merged the two sorted arrays into a single sorted array. This can be done by creating a new array or using an in-place merging technique. The merged array will contain all the elements from both arrays in sorted order.
Step 2: Find the Median: Once the arrays are merged, I determined the length of the merged array. If the length is odd, the median will be the middle element. If the length is even, the median will be the average of the two middle elements. For an odd-length array, I accessed the element at the index (length - 1) / 2. For an even-length array, I accessed the elements at indices length / 2 and length / 2 - 1, and then calculated their average.
Step 3: Return the Median: Finally, I returned the calculated median as the result of the function or as the output of the algorithm.



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.
Step 1: Depth-First Search (DFS): I used a Depth-First Search algorithm to traverse the graph and detect cycles. Starting from a given node, I explored its adjacent nodes and continued the traversal until all nodes were visited or a cycle was detected.
Step 2: Tracking Visited Nodes: During the DFS traversal, I maintained a visited array or set to keep track of the visited nodes. This helped me avoid revisiting nodes and also assisted in identifying cycles. If I encountered a node that was already visited and not the parent of the current node, it indicated the presence of a cycle in the graph.
Step 3: Recursive Approach: To implement the DFS algorithm, I used a recursive approach. I recursively explored the adjacent nodes of each unvisited node, updating the visited array and checking for cycles at each step. If I found a cycle, I stopped the traversal and returned the result.
Tell me about a time when you faced failure or made a mistake. How did you handle it?
How do you handle work-life balance?
Tell me about a time when you demonstrated leadership skills.
Why are you interested in this role/company?
How do you handle conflicts or disagreements within a team?

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?