Karat interview, one hour.
I finished two questions. For the third one I explained my approach but ran out of time to finish writing it.
Question 1
Given a store map with different products and a shopping_list, find the minimum number of times needed to buy all the items.
Question 2
Given a graph representing a map, with some attractions on it and travel times between the attractions. Several cars run fixed routes. Some people at different attractions want to get on a car to go to another place, and they take the earliest car that arrives. Find which people will be on each car.
Question 3
Given a graph representing a map, with several trails between attractions. Given a list of attractions, determine whether it is possible to visit all the attractions in the list when each trail can be walked at most once. The attractions do not have to be visited in order.
I don't know whether finishing two questions is enough to pass the bar, I hope I get through the interview.
Discussion
Loading comments…