今際の国の呵呵君
Wednesday, November 14, 2018
[LeetCode]Reorder Log Files
这道题定义自己custom的compare function即可,按照题目的要求来。注意用stable sort因为要保持数组log的原顺序。时间复杂度O(n * log n),代码如下:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment