摘要: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, 阅读全文
posted @ 2018-08-15 09:13 jasminemzy 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, remove the duplicate numbers in it. You should: 1. Do it in place in the array. 2. Move the unique numbers to the front of 阅读全文
posted @ 2018-08-15 06:57 jasminemzy 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 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.ExampleGiven nums 阅读全文
posted @ 2018-08-15 05:30 jasminemzy 阅读(100) 评论(0) 推荐(0) 编辑