CS-OA cs-vo Faang



meta ,真题如下

you are given a binary search tree. Goal is to find the sum of all elements in the tree which are in range [low, high].


You are given an integer array of size N.Everyelement ofthe array is greater than or equal to 0.Starting from arr[start index],follow eachelement to the indexitpoints.to.
Continue to do this until you finda cycle.Return the length ofthe cycle.Ifno cycle is found return -1

Doordash 真题如下

 Suppose you are in charge of implementing the restaurant search bar at DoorDash. Your goal is to.given a list of N restaurant names, handle M subsequent search queries, where for each query you return up to K restaurants whose name contains the query as a prefix, For example, if K=2 and the search query is "pan", we may return "panda express" and "panera bread"



Leave a Reply

Your email address will not be published. Required fields are marked *