文章 2023-01-05 来自:开发者社区

LeetCode 304. Range Sum Query 2D - Immutable

DescriptionGiven 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 2DThe above re....

LeetCode 304. Range Sum Query 2D - Immutable
文章 2017-12-15 来自:开发者社区

[LeetCode] Count of Range Sum 区间和计数

Given an integer array nums, return the number of range sums that lie in [lower, upper] inclusive. Range sum S(i, j) is defined as the sum of the elements in nums be...

文章 2017-12-13 来自:开发者社区

[LeetCode] Range Addition 范围相加

Assume you have an array of length n initialized with all 0's and are given k update operations. Each operation is represented as a triplet: [startIndex, endIndex, inc]&n...

文章 2017-12-02 来自:开发者社区

[LeetCode] Search for a Range 搜索一个范围

Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not fo...

文章 2017-12-02 来自:开发者社区

[LeetCode] Bitwise AND of Numbers Range 数字范围位相与

Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. For example, given the range [5, 7], you should return 4. Credits: Speci....

文章 2017-11-16 来自:开发者社区

LeetCode:Search Insert Position,Search for a Range (二分查找,lower_bound,upper_bound)

Search Insert Position Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no dup....

文章 2017-11-13 来自:开发者社区

leetCode 303. Range Sum Query - Immutable | Dynamic Programming

303. 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...

文章 2017-11-08 来自:开发者社区

[LeetCode] Range Addition II 范围相加之二

Given an m * n matrix&nbsp;M&nbsp;initialized with all&nbsp;0's and several update operations. Operations are represented by a 2D array, and each operation is represented by an array with two&nbsp;pos...

文章 2017-11-07 来自:开发者社区

[LeetCode] Smallest Range 最小的范围

You have k lists of sorted integers in ascending order. Find the smallest range that includes at least one number from each of the k lists. We define the range [a,b] is s...

文章 2016-10-31 来自:开发者社区

[LeetCode]--34. Search for a Range

Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm’s runtime complexity must be in the order of O(log n). If the target is not found in ...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

算法编程

开发者社区在线编程频道官方技术圈。包含算法资源更新,周赛动态,每日一题互动。

+关注