5 hope1262946533




TA的排名 3k+

【LeetCode】92. Reverse Linked List II

题目:Reverse a linked list from positionmton. Do it in one-pass.Note:1 ≤m≤n≤ length of list.Example:Input: 1->2->3->4->5->NULL, m = 2, n = 4Output: 1->4->3->2-&...

2019-07-28 17:50:58

【LeetCode】91. Decode Ways

题目:A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given anon-emptystring containing only digits, determ...

2019-07-24 22:31:03

【LeetCode】90. Subsets II

题目:Given a collection of integers that might contain duplicates,nums, return all possible subsets (the power set).Note:The solution set must not contain duplicate subsets.Example:Input: [1,...

2019-07-15 21:35:54

【LeetCode】89. Gray Code【未完待续】

题目:The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number of bits in the code, print the sequence ...

2019-07-12 23:03:05

【LeetCode】88. Merge Sorted Array

题目:Given two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted array.Note:The number of elements initialized innums1andnums2aremandnrespectively. You may assume...

2019-07-01 21:44:16

【LeetCode】87. Scramble String

题目:Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation ofs1="great": great / \ ...

2019-06-24 21:58:58

【LeetCode】86. Partition List

题目:Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the original relative order of the nodes in each...

2019-06-12 22:49:54

【LeetCode】85. Maximal Rectangle【未完待续】

题目:Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.Example:Input:[ ["1","0","1","0","0"], ["1","0","1","1","1"], ["1"...

2019-06-11 22:29:06

【LeetCode】84. Largest Rectangle in Histogram

题目:Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.Above is a histogram where width ...

2019-06-04 22:33:24

【LeetCode】83. Remove Duplicates from Sorted List

题目:Given a sorted linked list, delete all duplicates such that each element appear onlyonce.Example 1:Input: 1->1->2Output: 1->2Example 2:Input: 1->1->2->3->3Outpu...

2019-05-31 22:56:58

【LeetCode】82. Remove Duplicates from Sorted List II

题目:Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.Example 1:Input: 1->2->3->3->4->4->5Output: ...

2019-05-31 22:50:43

【LeetCode】81. Search in Rotated Sorted Array II

题目:Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e.,[0,0,1,2,2,5,6]might become[2,5,6,0,0,1,2]).You are given a target value to search. If f...

2019-05-29 22:56:23

【LeetCode】80. Remove Duplicates from Sorted Array II

题目:Given a sorted arraynums, remove the duplicatesin-placesuch that duplicates appeared at mosttwiceand return the new length.Do not allocate extra space for another array, you must do this b...

2019-05-28 21:17:32

【LeetCode】79. Word Search

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

2019-05-27 22:42:54

【LeetCode】78. Subsets

题目:Given a set ofdistinctintegers,nums, return all possible subsets (the power set).Note:The solution set must not contain duplicate subsets.Example:Input: nums = [1,2,3]Output:[ [3],...

2019-05-26 21:04:48

【LeetCode】77. Combinations

题目:Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.Example:Input:n = 4, k = 2Output:[ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4],]描述:给...

2019-05-24 22:57:31

【LeetCode】76. Minimum Window Substring

题目:Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).Example:Input: S = "ADOBECODEBANC", T = "ABC"Output: "BANC"Not...

2019-05-24 20:43:58

【LeetCode】75. Sort Colors

题目:Given an array withnobjects colored red, white or blue, sort themin-placeso that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use t...

2019-05-19 09:46:41

【LeetCode】74. Search a 2D Matrix

题目:Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from left to right. The first integer of eac...

2019-05-17 08:59:35

【LeetCode】73. Set Matrix Zeroes【未完待续】

题目:Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do itin-place.Example 1:Input: [ [1,1,1], [1,0,1], [1,1,1]]Output: [ [1,0,1], [0,0,0], [1,0,1]...

2019-05-16 21:56:44


勋章 我的勋章
  • 持之以恒
  • 勤写标兵Lv4