- 博客(12)
- 收藏
- 关注
原创 [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
342
原创 [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
280
转载 Android高级控件----AdapterView与Adapter
原文Cindere_liuqiqi 的BLOG在J2EE中提供过一种非常好的框架--MVC框架,实现原理:数据模型M(Model)存放数据,利用控制器C(Controller)将数据显示在视图V(View)上。在Android中有这样一种高级控件,他的实现过程就类似于MVC框架。之所以称它高级,是因为他的使用不像其他控件一样,拖拽到界面上就能用,而是需要通过适配器将某些样式的数
2015-03-23 23:19:11
375
原创 [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
292
原创 [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
283
原创 [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
259
原创 [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
261
原创 [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
371
原创 [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
287
原创 [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
345
原创 [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
255
原创 [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
414
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人