摘要: Problem Definition:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrange... 阅读全文
posted @ 2015-08-01 21:27 曾可爱 阅读(332) 评论(0) 推荐(0) 编辑
摘要: Problem Definition:Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.Solution:就是要用加减和位操作之类... 阅读全文
posted @ 2015-08-01 20:38 曾可爱 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Problem Definition:Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as... 阅读全文
posted @ 2015-08-01 20:25 曾可爱 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Problem Definition:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a ... 阅读全文
posted @ 2015-08-01 20:20 曾可爱 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Problem Definition:Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplet... 阅读全文
posted @ 2015-08-01 20:08 曾可爱 阅读(157) 评论(0) 推荐(0) 编辑