Min Cost to Repair Edges (Minimum Spanning Tree II)
AmazonOnline AssessmentMSTGraph
Rose Garden
GoogleOnline Assessment
Minimum Number Of Decreasing Subsequence Partitions
GoogleOnline AssessmentHardDP
Cut Binary Search Tree
AmazonTreeBSTHardLC
Subtree: Maximum Average Node
AmazonOnline AssessmentMediumTree
Fill 2D Array
GoogleOnline Assessment
Rearrange String
String
Pickup Coupon
GoogleOnline Assessment
Tree Diameter
Google
Top N Buzzwords
AmazonOnline AssessmentHOT
Load Balancer
AmazonOnline Assessment
Find Substrings
AmazonOnline AssessmentHard
Partition String
AmazonOnline AssessmentStringMedium
E-Mart Product Ranking
While the database is being transferred, an unknowing customer logs onto the website and browses some of E-Mart's items. Given a server log in chronological order, determine which items were shown to the customer.
E-Mart has an unusual way of displaying items:
If a customer views the first item, they will be shown the cheapest item in the database;
If a customer is currently viewing the kth cheapest item, viewing the next item will display the (k+1)th cheapest item;
If multiple items have the same price, they are ordered alphabetically ascending;