野球拳刷刷刷

LeetCode LintCode 解题报告

Sunday, September 29, 2019

subarray sum

›
Question: Given an array in arbitrary order, find if there exists a contiguous subarray sum up to the target. Example: arr = [5, 1, 3,...
Friday, November 23, 2018

938. Range Sum of BST

›
Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive). The binary sear...

939. Minimum Area Rectangle

›
Given a set of points in the xy-plane, determine the minimum area of a rectangle formed from these points, with sides parallel to the x and ...
Thursday, November 22, 2018

941. Valid Mountain Array

›
Given an array A of integers, return true if and only if it is a valid mountain array. Recall that A is a mountain array if and only if: ...

942. DI String Match

›
Given a string S that only contains "I" (increase) or "D" (decrease), let N = S.length. Return any permutation A of [0...
Sunday, September 2, 2018

437. Path Sum III

›
You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path d...
Tuesday, May 29, 2018

443. String Compression

›
Given an array of characters, compress it in-place. The length after compression must always be smaller than or equal to the original arra...

219. Contains Duplicate II

›
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j...
Monday, May 28, 2018

830. Positions of Large Groups

›
In a string S of lowercase letters, these letters form consecutive groups of the same character. For example, a string like S = "abb...

836. Rectangle Overlap

›
A rectangle is represented as a list [x1, y1, x2, y2] , where (x1, y1) are the coordinates of its bottom-left corner, and (x2, y2) are the...
Thursday, May 24, 2018

744. Find Smallest Letter Greater Than Target

›
Given a list of sorted characters letters containing only lowercase letters, and given a target letter target , find the smallest element ...
Monday, August 21, 2017

654. Maximum Binary Tree

›
Given an integer array with no duplicates. A maximum tree building on this array is defined as follow: The root is the maximum number in ...
Monday, August 14, 2017

657. Judge Route Circle

›
Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves bac...
Thursday, August 10, 2017

82. Remove Duplicates from Sorted List II

›
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only  distinct  numbers from the original list. For exa...
Wednesday, August 9, 2017

83. Remove Duplicates from Sorted List

›
Given a sorted linked list, delete all duplicates such that each element appear only  once . For example, Given  1->1->2 , return ...
Tuesday, August 8, 2017

653. Two Sum IV - Input is a BST

›
Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the give...
›
Home
View web version
Powered by Blogger.