Add sorting to a comment list with persistence across refresh
Implement sorting for a comment list.
You have a list of comments; each comment has at least:
id: string/intuserId: string/inttimestamp: ISO string or epoch millisecondscontent: st...
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:
