摘要:
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. 阅读全文
摘要:
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. 阅读全文
摘要:
多进程网络编程中处理fork后可能的僵死进程和可能被中断的系统调用问题。 阅读全文
摘要:
Divide two integers without using multiplication, division and mod operator.
If it is overflow, return MAX_INT. 阅读全文
摘要:
Implement strStr().
Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 阅读全文
摘要:
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. 阅读全文
摘要:
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 阅读全文
摘要:
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. 阅读全文