上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order). The replacement must be in-place, do not allocate extra memory. 阅读全文
posted @ 2017-05-10 10:30 JeffLai 阅读(142) 评论(0) 推荐(0) 编辑
摘要: You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and without any intervening characters. 阅读全文
posted @ 2017-05-09 21:02 JeffLai 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 多进程网络编程中处理fork后可能的僵死进程和可能被中断的系统调用问题。 阅读全文
posted @ 2017-05-08 22:12 JeffLai 阅读(370) 评论(0) 推荐(0) 编辑
摘要: Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. 阅读全文
posted @ 2017-05-08 14:58 JeffLai 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 阅读全文
posted @ 2017-05-08 11:02 JeffLai 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you must do this in place with constant memory. The order of elements can be changed. It doesn't matter what you leave beyond the new length. 阅读全文
posted @ 2017-05-08 10:29 JeffLai 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Description Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate ex 阅读全文
posted @ 2017-05-08 10:23 JeffLai 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is. You may not alter the values in the nodes, only nodes itself may be changed. Only constant memory is allowed. 阅读全文
posted @ 2017-05-08 10:04 JeffLai 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, swap every two adjacent nodes and return its head. 阅读全文
posted @ 2017-05-07 22:50 JeffLai 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 阅读全文
posted @ 2017-05-07 22:37 JeffLai 阅读(140) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页