- 博客(8)
- 收藏
- 关注
原创 leetcode 307 : Range Sum Query - Mutable
1、原题如下: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. The update(i, val) function modifies nums by updating the element at index i to val.
2015-11-30 13:40:08 587
原创 leetcode 306 : Additive Number
1、原题如下 Additive number is a string whose digits can form additive sequence. A valid additive sequence should contain at least three numbers. Except for the first two numbers, each subsequent num
2015-11-27 21:27:38 484
原创 leetcode 304 : Range Sum Query 2D - Immutable
1、原题如下: Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2, col2). Range Sum Query 2D The a
2015-11-23 13:51:56 304
原创 leetcode 303 : Range Sum Query - Immutable
1、原题如下: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.Example: Given nums = [-2, 0, 3, -5, 2, -1]sumRange(0, 2) -> 1 sumRange(2, 5) -> -1 sumR
2015-11-20 11:22:05 326
原创 leetcode 301 : Remove Invalid Parentheses
1、原题如下: Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results.Note: The input string may contain letters other than the parentheses ( an
2015-11-06 21:14:33 450
原创 leetcode 300 : Longest Increasing Subsequence
1、原题如下: Given an unsorted array of integers, find the length of longest increasing subsequence.For example, Given [10, 9, 2, 5, 3, 7, 101, 18], The longest increasing subsequence is [2, 3, 7, 101],
2015-11-06 13:16:18 434
原创 leetcode 240 : Search a 2D Matrix II
1、原题如下: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted in ascending from left to right. Integers i
2015-11-03 11:21:22 281
原创 leetcode 299 : Bulls and Cows
1、原题如下: You are playing the following Bulls and Cows game with your friend: You write a 4-digit secret number and ask your friend to guess it. Each time your friend guesses a number, you give a hint.
2015-11-02 18:21:39 290
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人