Airbnb Interview Question for Software Engineers
- 2of 2 votes
Airbnb Online Assessment Paginate List- aonecoding October 13, 2017 in United States
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).
6,29,185.2,SF -- 6 repeats in page bec no more unique host ID available
| Report Duplicate | Flag | PURGE
Airbnb Software Engineer Algorithm
Interview Type: Written Test
Open Chat in New Window