摘要: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. 阅读全文
posted @ 2017-07-02 23:52 王大咩的图书馆 阅读(316) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted integer array, find the first missing positive integer. For example,Given[1,2,0]return3,and[3,4,-1,1]return2. Your algorithm should 阅读全文
posted @ 2017-07-02 22:36 王大咩的图书馆 阅读(205) 评论(0) 推荐(0) 编辑
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2017-07-02 15:55 王大咩的图书馆 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space to hold additional elements 阅读全文
posted @ 2017-07-02 10:27 王大咩的图书馆 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array A =[1,1,1,2,2,3], Your function should 阅读全文
posted @ 2017-07-02 01:26 王大咩的图书馆 阅读(321) 评论(0) 推荐(0) 编辑