Sort Documents Left to Right
Given n documents on a canvas, each document has a unique ID and an x coordinate representing its left boundary. Sort the documents in left-to-right reading order: a smaller x coordinate comes f...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
