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

SDE - 1

Expedia Group
upvote
share-icon
1 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration120 minutes
Interview date24 May 2015
Coding problem2

The test was divided into two parts : Section A had questions from Quantitative, C language, Logical and English. The second part had two coding questions.

1. Deletion In Circular Linked List

Easy
0/40
Asked in company
Expedia Group

You are given a Circular Singly Linked List of integers. Given a value ‘VAL’, delete the first occurrence of this value in the linked list. If the given value is not present, return the same linked list.

Example:

Circular Linked List

Problem approach
  1. If the list is empty simply return.
  2. If the list is not empty, then we define two pointers curr and prev and initialize the pointer curr with the head node.
  3. Traverse the circular linked list using curr to find the node to be deleted and before moving curr to the next node everytime, set prev = curr so that previous will be on one node behind current.
  4. If the node is found, check if it is the only node in the circular linked list. If yes, do head = NULL.
  5. If the circular linked list has more than one node, check if it is the first node of the list. To confirm this, check (curr == head). If yes, then move prev until it reaches the last node. After prev reaches the last node, then set head = head.next and prev.next = head.
  6. If curr is not the first node, we check if it is the last node in the list. To check this is condition (curr.next == head).
  7. If curr is the last node. Do prev.next = head and delete the node curr by applying free(curr).
  8. If the node to be deleted is neither the first node nor the last node, then set prev.next = temp.next.
Try solving now

2. LRU Cache Implementation

Moderate
25m average time
65% success
0/80
Asked in companies
MicrosoftUberSalesforce

Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:

1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.

2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
You will be given ‘Q’ queries. Each query will belong to one of these two types:
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
Note :
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).

2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.
Problem approach

We will use an array of type Pair<key, value> to implement our LRU Cache where the larger the index is, the more recently the key is used. Means, the 0th index denotes the least recently used pair, and the last index denotes the most recently used pair.

 

The key will be considered as accessed if we try to perform any operation on it. So while performing the get operation on a key, we will do a linear search, if the key found in the cache at an index id we will left shift all keys starting from id+1 in the cache by one and put the key at the end (marking it as the most recently used key in the cache). 

 

Similarly, while performing the put operation on a key, we will do a linear search, if the key found at index equals to id, we will shift left all keys starting from id+1 in the cache by one and put the key at the end. Otherwise, we will check the current size of the cache. If the size equals capacity, we will remove the first(0th) key from the cache by doing the left shift on all the keys by one. Now we can simply insert the key at the end.

 

size: denotes the current size of the cache.

capacity: denotes the maximum keys cache can hold at one time.

cache: denotes the array of type pair to store key-value pairs.

Pair: Pair type will store these values, key, value.

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
821 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115096 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58237 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35146 views
7 comments
0 upvotes