自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 LeetCode 刷题之路 Excel Sheet Column Title

Excel Sheet Column TitleGiven a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 ...

2018-07-10 17:46:12 233

原创 LeetCode 刷题之路 Longest Word in Dictionary

Longest Word in DictionaryGiven a list of strings words representing an English Dictionary, find the longest word in words that can be built one character at a time by other words in words. If there i...

2018-06-30 18:15:29 205

原创 LeetCode 刷题之路 Map Sum Pairs

Map Sum PairsImplement a MapSum class with insert, and sum methods.For the method, insert, you'll be given a pair of (string, integer). The string represents the key and the integer represents the val...

2018-06-30 17:06:10 349

原创 LeetCode 刷题之路 Word Search II

Word Search IIGiven a 2D board and a list of words from the dictionary, find all words in the board.Each word must be constructed from letters of the sequentially adjacent cell, where "adjacent" cells...

2018-06-30 12:33:14 171

原创 LeetCode 刷题之路 Word Search

Word SearchGiven a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of the sequentially adjacent cell, where "adjacent" cells are those horizontally or...

2018-06-29 18:00:35 176

原创 LeetCode 刷题之路 Implement Trie (Prefix Tree)

Implement Trie (Prefix Tree)Implement a trie with insert, search, and startsWith methods.Example:Trie trie = new Trie();trie.insert("apple");trie.search("apple"); // returns truetrie.search("app...

2018-06-29 11:10:30 221

转载 转载Java length, length(), size()

1 java中的length属性是针对数组说的,比如说你声明了一个数组,想知道这个数组的长度则用到了length这个属性.2 java中的length()方法是针对字符串String说的,如果想看这个字符串的长度则用到length()这个方法.3.java中的size()方法是针对泛型集合说的,如果想看这个泛型有多少个元素,就调用此方法来查看!这个例子来演示这两个方法和一个属性的用法public ...

2018-06-28 11:14:12 231

原创 LeetCode 刷题之路 Longest Substring Without Repeating Characters

Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is ...

2018-06-27 22:44:27 127

原创 LeetCode 刷题之路 Multiply Strings

Multiply StringsGiven two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.Example 1:Input: num1 = "2", num2 = "3"Output: ...

2018-06-20 21:48:17 219

原创 LeetCode 刷题之路 Add Binary

Add BinaryGiven two binary strings, return their sum (also a binary string).The input strings are both non-empty and contain only characters 1 or 0.Example 1:Input: a = "11", b = "1"Output: "100"Exam...

2018-06-13 16:49:40 221

原创 LeetCode 刷题之路 Add Two Numbers

Add Two Numbers You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contains a single digit. Add the two num...

2018-06-12 17:19:41 148

原创 LeetCode刷题之路 3Sum Smaller

3Sum SmallerGiven an array of n integers nums and a target, find the number of index triplets i, j, k with 0 <= i < j < k < n that satisfy the condition nums[i] + nums[j] + nums[k] < ta...

2018-06-12 11:40:16 285

原创 LeetCode刷题之路 3Sum Closest

3Sum Closest Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each...

2018-06-12 11:40:09 158

原创 LeetCode刷题之路 3Sum

3SumGiven an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:The solution set must not cont...

2018-06-12 11:40:03 189

原创 LeetCode刷题之路 Two Sum II - Input array is sorted

Two Sum II - Input array is sortedGiven an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The function twoSum should re...

2018-06-12 11:39:58 166

原创 LeetCode刷题之路 Two Sum

Two Sum 两数之和Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use...

2018-06-12 11:39:49 150

原创 LeetCode 刷题之路 4Sum

4Sum Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum o...

2018-06-12 11:39:16 116

原创 LeetCode 刷题之路 4Sum II

4SumGiven four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero.To make problem a bit easier, all A, B, C, D have same len...

2018-06-12 11:39:08 130

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除