摘要: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, giv 阅读全文
posted @ 2017-09-11 04:39 Jimmy_Cheng 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3].... For example, given nums = [3, 5, 2, 1, 6, 4], 阅读全文
posted @ 2017-09-11 01:58 Jimmy_Cheng 阅读(281) 评论(0) 推荐(0) 编辑