![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
文章平均质量分 70
遛马hal
这个作者很懒,什么都没留下…
展开
-
[leetcode] 39& 40 Combination Sum I& II
if (i != index && num[i] == num[i - 1]) continue; Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same原创 2015-02-17 15:14:03 · 351 阅读 · 0 评论 -
[leetcode] 199 Binary Tree Right Side View
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For example: Given the following binary tree, 1原创 2015-04-05 11:39:29 · 261 阅读 · 0 评论 -
[leetcode] 72 Edit Distance
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 operations permitted on a word:原创 2015-03-23 10:41:12 · 272 阅读 · 0 评论 -
[leetcode] 3 Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo原创 2015-02-28 09:13:11 · 261 阅读 · 0 评论 -
[leetcode] 20 Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are all va原创 2015-02-11 18:23:48 · 229 阅读 · 0 评论 -
[leetcode] 10 Regular Expression Matching
Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the entire input st原创 2015-02-25 10:12:50 · 236 阅读 · 0 评论 -
[leetcode] 77 Combinations
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example, If n = 4 and k = 2, a solution is: [ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4], ]原创 2015-02-17 15:34:40 · 236 阅读 · 0 评论 -
[leetcode] 6 ZigZag Conversion
ZigZag Conversion The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)原创 2015-02-09 19:03:01 · 390 阅读 · 0 评论 -
[leetcode] 141& 142 Linked List Cycle I& II
Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 这也算是一道经典的题目了,快慢指针的思想,一个指针每次走一步,另一个每次走两步,倘若两个指针能够再次相遇,则说明链存在环 /** * Definition fo原创 2015-02-17 14:48:57 · 268 阅读 · 0 评论 -
[leetcode] 17 Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Input:Digit st原创 2015-02-17 14:26:34 · 320 阅读 · 0 评论 -
[leetcode] 274 275 H-Index I && II
Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According to the definition of h-index on Wikipedia: "A原创 2015-09-30 01:15:54 · 318 阅读 · 0 评论