- 博客(6)
- 收藏
- 关注
原创 leetcode:
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given the following matrix: 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 R
2015-12-20 18:45:35 278
原创 leetcode: Search a 2D Matrix II
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 in
2015-12-20 17:04:37 267
原创 Range Sum Query - Immutable
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 sumRang
2015-12-20 12:04:31 301
原创 Bulb Switcher
There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every third bulb (turning on if it's off or turning off
2015-12-20 10:04:31 1438
转载 Find the subarray with least average
转自:http://www.geeksforgeeks.org/find-subarray-least-average/ Given an array arr[] of size n and integer k such that k Input: arr[] = {3, 7, 90, 20, 10, 50, 40}, k = 3 Output: Subarray between
2015-12-19 00:41:35 226
转载 geeksforgeeks Count number of binary strings without consecutive 1’s
转自:http://www.geeksforgeeks.org/count-number-binary-strings-without-consecutive-1s/ Count number of binary strings without consecutive 1’s Given a positive integer N, count all possible distin
2015-12-10 23:50:18 373
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人