- 博客(5)
- 资源 (2)
- 收藏
- 关注
原创 leetcode 44. Wildcard Matching
Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (including the empty sequence). The matching should cover t
2017-07-14 16:08:15 172
原创 leetCode Trapping Rain Water
1、观察图形,能积水的部分一定是两个塔顶之间,所以可以先找到所有的塔顶list,再算它们之间积水 2、首先找到list最高的两个塔顶firHigh,secHigh,那么它们之间的积水一定是两个顶之间较低的那个sum(secHigh-height[i])。然后可以把list中firHigh,secHigh之间的塔顶拿掉 3、然后再找剩下的塔顶里面最高的highpos,如果highpos在以计算区
2017-07-14 12:24:09 303
原创 leetcode 30. Substring with Concatenation of All Words
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 wi
2017-07-08 18:12:44 165
原创 LeetCode 25. Reverse Nodes in k-Group
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 o
2017-07-07 16:41:50 231
原创 LeetCode 23. Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 有k个各自排好序的单链表,把它们合并成一个有序链表 这个题很明显的用归并排序思想可以解决,不过对时间的要求顺序比较高,直接用循环不容易达到时间限制要求。 方法1.每次从k个链表取表头作
2017-07-02 13:33:10 138
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人