
刷题记录
JianS_Ted
这个作者很懒,什么都没留下…
展开
-
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 · 352 阅读 · 0 评论 -
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 · 176 阅读 · 0 评论 -
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 · 250 阅读 · 0 评论 -
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 · 413 阅读 · 0 评论 -
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 · 227 阅读 · 0 评论 -
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 · 202 阅读 · 0 评论 -
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 · 254 阅读 · 0 评论 -
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 · 215 阅读 · 0 评论 -
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 · 209 阅读 · 0 评论 -
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 · 217 阅读 · 0 评论 -
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 · 208 阅读 · 0 评论 -
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 · 263 阅读 · 0 评论 -
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 · 250 阅读 · 0 评论 -
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 · 182 阅读 · 0 评论 -
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 · 179 阅读 · 0 评论 -
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 · 145 阅读 · 0 评论 -
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 · 288 阅读 · 0 评论