Expedia Group interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Expedia Group
upvote
share-icon
3 rounds | 9 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Prepare all your projects
Tip 2 : Daily practice of aptitude
Tip 3 : Practice previous years Company questions

Application process
Where: Linkedin
Eligibility: 7 CGPA
Resume Tip
Resume tip

Tip 1 : Resume should contains only those skills that you know
Tip 2 : Add good projects and add github link to it also
Tip 3 : Resume should not be too long

Interview rounds

01
Round
Easy
Online Coding Interview
Duration120 minutes
Interview date23 Dec 2021
Coding problem2

This round comprised of four sections (Quantitative, C, Logical and English). and a coding Section. Every Section has a timer. There was cutoff for every round. The coding sections consists of 2 questions.

1. LCA Of Binary Tree

Moderate
10m average time
90% success
0/80
Asked in companies
GrabDisney + HotstarShareChat

You have been given a Binary Tree of distinct integers and two nodes ‘X’ and ‘Y’. You are supposed to return the LCA (Lowest Common Ancestor) of ‘X’ and ‘Y’.


The LCA of ‘X’ and ‘Y’ in the binary tree is the shared ancestor of ‘X’ and ‘Y’ that is located farthest from the root.


Note :
You may assume that given ‘X’ and ‘Y’ definitely exist in the given binary tree.
For example :
For the given binary tree

Example

LCA of ‘X’ and ‘Y’ is highlighted in yellow colour.
Problem approach

To determine the distance between pairs of nodes in a tree: the distance from n1 to n2 can be computed as the distance from the root to n1, plus the distance from the root to n2, minus twice the distance from the root to their lowest common ancestor.

The idea of this approach is to store the path from the root to n1 and root to n2 in two separate data structures. Then look simultaneously into the values stored in the data structure, and look for the first mismatch

Try solving now

2. Flatten Linked List

Moderate
0/80
Asked in companies
DunzoAmazonExpedia Group

You are given a Multilevel Linked List of integers, where in addition to the next pointer each node has a child pointer, which may or may not point to a separate list. These child lists may have one or more children of their own, and so on, to produce a multilevel data structure, as shown in the below figure. You are given the head of the first level of the list. Flatten the list so that all the nodes appear in a single-level linked list. You need to flatten the list in a way that all nodes at first level should come first, then nodes of the second level, and so on.

example

                FIGURE 1

Input for the above list is:
10 5 12 7 11 -1 4 20 13 -1 -1 -1 17 6 -1 -1 -1  2 -1 16 -1 9 8 -1 -1 -1 3 -1 19 15 -1 -1 -1 -1 -1
Problem approach

The idea is to use the Merge() process of merge sort for linked lists. Use merge() to merge lists one by one, recursively merge() the current list with the already flattened list. The down pointer is used to link nodes of the flattened list.

Follow the given steps to solve the problem:

Recursively call to merge the current linked list with the next linked list
If the current linked list is empty or there is no next linked list then return the current linked list (Base Case)
Start merging the linked lists, starting from the last linked list
After merging the current linked list with the next linked list, return the head node of the current linked list

Try solving now
02
Round
Medium
Video Call
Duration90 minutes
Interview date30 Dec 2021
Coding problem4

This was technical Round -1 . Interviewer went through my resume and ask questions accordingly. He gave me coding questions to solve and ask some questions from DBMs and Operating systems

1. Maximum Distance

Hard
25m average time
75% success
0/120
Asked in companies
Expedia GroupGoogle inc

You are given an array of binary strings ‘arr’ of size ‘N’. Your task is to find out the maximum distance between the pair of strings.

The distance between two binary strings is defined as the sum of their lengths after removing the common prefix.

For example:
You are given ‘arr’ = [ “01011”,  “010110”, “0111”], Here the strings with the maximum distance between them are “010110” and  “0111”, where the prefix is “01”,  hence the maximum distance is  4 + 2 = 6. Hence the answer is 6.
Try solving now

2. Job Sequencing Problem

Moderate
30m average time
70% success
0/80
Asked in companies
MicrosoftOlaMorgan Stanley

You are given a 'Nx3' 2-D array 'Jobs' describing 'N' jobs where 'Jobs[i][0]' denotes the id of 'i-th' job, 'Jobs[i][1]' denotes the deadline of 'i-th' job, and 'Jobs[i][2]' denotes the profit associated with 'i-th job'.


You will make a particular profit if you complete the job within the deadline associated with it. Each job takes 1 unit of time to be completed, and you can schedule only one job at a particular time.


Return the number of jobs to be done to get maximum profit.


Note :
If a particular job has a deadline 'x', it means that it needs to be completed at any time before 'x'.

Assume that the start time is 0.


For Example :
'N' = 3, Jobs = [[1, 1, 30], [2, 3, 40], [3, 2, 10]].

All the jobs have different deadlines. So we can complete all the jobs.

At time 0-1, Job 1 will complete.
At time 1-2, Job 3 will complete.
At time 2-3, Job 2 will complete.

So our answer is [3 80].
Problem approach

Follow the given steps to solve the problem:

Sort all jobs in decreasing order of profit. 
Iterate on jobs in decreasing order of profit.For each job , do the following : 
Find a time slot i, such that slot is empty and i < deadline and i is greatest.Put the job in 
this slot and mark this slot filled. 
If no such i exists, then ignore the job.

Try solving now

3. OS Question

Explain demand paging?

Problem approach

Demand paging is a method that loads pages into memory on demand. This method is mostly used in virtual memory. In this, a page is only brought into memory when a location on that particular page is referenced during execution.

4. OS Question

What do you mean by RTOS?

Problem approach

Real Time Operating System (RTOS) is an operating system that is used for real-time applications i.e., for those applications where data processing should be done in a fixed and small measure of time. It performs much better on tasks that are needed to be executed within a short time. It also takes care of execution, monitoring, and all-controlling processes. It also occupies less memory and consumes fewer resources.

03
Round
Easy
Face to Face
Duration90 minutes
Interview date4 Jan 2022
Coding problem3

This was technical round - 2. This round was harder than previous round. The interviewer who came was highly experienced .

1. LRU Cache

Moderate
0/80
Asked in companies
Info Edge India (Naukri.com)OlaExpedia Group
Design a data structure that satisfies the constraints of a Least Recently Used (LRU).
1. Get(int num): If the key exists, it will return the value of the key stored. Else, return -1.    
2. Put(int key, int value): If the key already exists, update the value of the key. Else add the key-value pair to the cache. If the number of keys is more than the capacity for this operation, delete the least recently key used. 
Example:
For the following input: 

4 2
2 1 4
1 1
1 4

We will initialize an empty LRU cache for the first operation with a maximum capacity of 2.
For the first operation, we need to add a key-value pair (1,4) to the cache.
For the second operation, we need to return the value stored for key 1, i.e., 4
For the third operation, we need to return -1, as we don't have any key 4 in the cache.

So, the final output will be: 
4  -1
Try solving now

2. Connect Nodes at Same Level

Moderate
30m average time
70% success
0/80
Asked in companies
Expedia GroupMicrosoftOla

A binary tree is a tree where each node has at most two children i.e left child and right child.

You are given a binary tree, where the structure of the node is as follow -:

class BinaryTreeNode {
 int data;      // Value of the node.
 BinaryTreeNode *left;  // Pointer to left child node.
 BinaryTreeNode *right; // Pointer to right child node.
 BinaryTreeNode *next;  // Pointer to next right node at same level. 
}

Your task is to connect all the adjacent nodes at the same level in the given binary tree. You can do this by populating each 'next' pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL. Initially, all the next pointers are set to NULL.

For Example:

Consider the figure shown below. The left part represents the initial binary tree and right part represents the binary tree after connecting adjacent nodes at the same level.

alt text

In the tree shown in the picture above -:
The ‘next’ pointer of the node having value 2 is connected to the node having value 3.
The ‘next’ pointer of the node having value 4 is connected to the node having value 5.
The ‘next’ pointer of the node having value 5 is connected to the node having value 6.
The ‘next’ pointer of nodes having value 1, 3, 6 will have a value NULL as there are no next right nodes in their cases.

Note:

1. The structure of the ‘Node’ of a binary tree is already defined. You should not change it.   
2. The root of the binary tree is known to you.  
3. There is at least one node in the given binary tree.
4. You may only use constant extra space.
Try solving now

3. Longest Repeating Subsequence

Moderate
15m average time
85% success
0/80
Asked in companies
Expedia GroupPayPalCvent

You are given a string ‘st’, Your task is to find the length of the longest repeating subsequence such that two subsequences don’t have the same character at the same position.

For Example :
The given string st = AABCBDC.

subsequence

As you can see there are two repeating longest subsequences “ABC” with the same character but different position. Therefore the required answer is ‘3’ as the length of “ABC” is 3.
Problem approach

Step 1: Initialize the input string, which is to be checked.

Step 2: Initialize the length of string to the variable.

Step 3: Create a DP table using 2D matrix and set each element to 0.

Step 4: Fill the table if characters are same and indexes are different.

Step 5: Return the values inside the table

Step 6: Print the String.

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 6 problems
Interviewed by Expedia Group
2313 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 6 problems
Interviewed by Expedia Group
2737 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Expedia Group
610 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Expedia Group
822 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes