DP World || Interview || SDE 1(Group SDE 1) || Round 2 and 3
Summary
Cleared Rounds 2 and 3 of the interview process which involved multiple DSA problems including tree to linked list conversion, binary search with greedy approach, cheapest flight within K stops, merge sorted lists, and find peak element.
Full Experience
Round 2 : (Problem Solving round)
Round was Fully focused on Data Structures and algorithm.
Question 1 -
Covert a Tree into linked list in which you were given left, right , next.
Next for linkedlist.
Discussed all the approach and finally the code for the optmised approach
Question 2 - Question was related to binary search dont remember the exact question but was solved using griddy approach.
verdict cleared.
Round 3 -
There were total of 3 dsa question.
Question 1- Cheapest flight within k stops (lc-787)
Question 2-Merge sorted list (lc-21)
Question 3-find peak element (lc-162)
verdict cleared.
Hope this will help for your preparation.
HM round is remaining lets pray for the good.
Interview Questions (5)
Convert Binary Tree to Linked List
You are given a binary tree with nodes having left, right, and next pointers. Convert the tree into a linked list such that the 'next' pointer points to the next node in level order traversal. Discuss approaches and implement the optimized solution.
Binary Search with Greedy Approach
A problem solvable using binary search combined with a greedy strategy. Exact details not remembered but involves applying greedy logic within a binary search framework.
Cheapest Flights Within K Stops
Find the cheapest price from src to dst with at most k stops. If there is no such route, return -1.
Merge Two Sorted Lists
Merge two sorted linked lists and return it as a sorted list. The list should be made by splicing together the nodes of the first two lists.
Find Peak Element
A peak element is an element that is strictly greater than its neighbors. Given a 0-indexed integer array nums, find a peak element, and return its index. If there are multiple peaks, return the index to any of the peaks.