ShareChat | SDEOA | Jun2022 |
Question · Posted Apr 2026
Given list of laptops. Each have a price and quantity. There will be Q queries, each query will have two price ranges. [p1, p2]. For each query we had to find out what is the maximum rating of laptop in the given price range. Had implemented this using Segment Tree + Binary Search but was facing RTE.
The full answer & interview discussion are available to premium members.
Log in Create a free account