Leave your Email to get the latest Airbnb interview questions weekly. No spam we promise.
Airbnb: Design webbrowser back button
Your web browser supports will support three actions: back, forward and open. The init webpage is “about:blank”.
Given a sequence of commands. Return the result page.
Min cost of flight from start to end if allowed at most k transfers.
Given all the flights in a string:
A->B,100,
B->C,100,
A->C,500,
If k = 1,from A to C the best route is A->B->C at the cost of 200.
Airbnb Online Assessment Paginate List
5
13
1,28,310.6,SF
4,5,204.1,SF
20,7,203.2,Oakland
6,8,202.2,SF
6,10,199.1,SF
1,16,190.4,SF
6,29,185.2,SF
7,20,180.1,SF
6,21,162.1,SF
2,18,161.2,SF
2,30,149.1,SF
3,76,146.2,SF
2,14,141.1,San Jose
Here is a sample input. It’s a list generated by user search.
(1,28,100.3,Paris) corresponds to (Host ID, List ID, Points, City).
5 in the first row tells each page at most keeps 5 records.
13 in the second row is the number of records in the list.
Please paginate the list for Airbnb by requirement:
1. When possible, two records with same host ID shouldn’t be in a page.
2. But if no more records with non-repetitive host ID can be found, fill up the page with the given input order (ordered by Points).
LeetCode
198 House Robber Easy
23 Merge k Sorted Lists Hard
336 Palindrome Pairs Hard
212 Word Search II Hard
221 Maximal Square Medium
251 Flatten 2D Vector Medium
160 Intersection of Two Linked Lists Easy
10 Regular Expression Matching Hard
202 Happy Number Easy
190 Reverse Bits Easy
20 Valid Parentheses Easy
108 Convert Sorted Array to Binary Search Tree Easy
269 Alien Dictionary Hard
2 Add Two Numbers Medium
220 Contains Duplicate III Medium
136 Single Number Easy
219 Contains Duplicate II Easy
217 Contains Duplicate Easy
1 Two Sum Easy
227 Basic Calculator II Medium
385 Mini Parser Medium
68 Text Justification Hard
415 Add Strings Easy
751 IP to CIDR Easy
755 Pour Water Medium
756 Pyramid Transition Matrix Medium
759 Employee Free Time Hard
773 Sliding Puzzle Hard
787 Cheapest Flights Within K Stops Medium
42 Trapping Rain Water