摘要:
Title:Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the l... 阅读全文
2015年4月20日
摘要:
Title: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not 阅读全文
2015年4月16日
摘要:
Title: Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. 思路就是每次以两倍增长除数,知道即将大于被除数,然后用被除数减 阅读全文
摘要:
Title: Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 当用char*的时候的一些操作,不要和string的弄混了.还有 阅读全文
2015年4月15日
摘要:
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then l 阅读全文
摘要:
Title: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 排好序的,然后merge,很容易让人联想到归并排序。可以将k个序列按照二分进行分割,然后 阅读全文
2015年4月14日
摘要:
Title: https://leetcode.com/problems/generate-parentheses/ Given n pairs of parentheses, write a function to generate all combinations of well-formed 阅读全文
2015年4月13日
摘要:
Title: Given a linked list, remove the nth node from the end of list and return its head. For example, class Solution {public: ListNode *removeNthFrom 阅读全文
摘要:
Title: https://leetcode.com/problems/letter-combinations-of-a-phone-number/ Given a digit string, return all possible letter combinations that the num 阅读全文
2015年4月12日