Skip to content

Commit fc36e01

Browse files
committed
format the image urls
1 parent 58c52e5 commit fc36e01

File tree

132 files changed

+426
-357
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+426
-357
lines changed

docs/0011-container-with-most-water.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Given _n_ non-negative integers _a~1~_, _a~2~_, ..., _a~n ~_, where each represe
88
99
1010
11-
<img alt="" src="https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/17/question_11.jpg" style="width: 600px; height: 287px;" />
11+
image::https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/17/question_11.jpg[]
1212
1313
[.small]#The above vertical lines are represented by array [1,8,6,2,5,4,8,3,7]. In this case, the max area of water (blue section) the container can contain is 49. #
1414

docs/0017-letter-combinations-of-a-phone-number.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Given a string containing digits from `2-9` inclusive, return all possible lette
66

77
A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters.
88

9-
<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Telephone-keypad2.svg/200px-Telephone-keypad2.svg.png" />
9+
image::http://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Telephone-keypad2.svg/200px-Telephone-keypad2.svg.png[]
1010

1111
*Example:*
1212

docs/0036-valid-sudoku.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be valid
1313
* Each of the 9 `3x3` sub-boxes of the grid must contain the digits `1-9` without repetition.
1414
1515
16-
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Sudoku-by-L2G-20050714.svg/250px-Sudoku-by-L2G-20050714.svg.png" style="height:250px; width:250px" />
16+
image::https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Sudoku-by-L2G-20050714.svg/250px-Sudoku-by-L2G-20050714.svg.png[]
1717

1818

1919
[.small]#A partially filled sudoku which is valid.#

docs/0037-sudoku-solver.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ A sudoku solution must satisfy *all of the following rules*:
1414
1515
Empty cells are indicated by the character `'.'`.
1616

17-
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Sudoku-by-L2G-20050714.svg/250px-Sudoku-by-L2G-20050714.svg.png" style="height:250px; width:250px" />
17+
image::https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Sudoku-by-L2G-20050714.svg/250px-Sudoku-by-L2G-20050714.svg.png[]
1818

1919

2020
[.small]#A sudoku puzzle...#
2121

22-
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Sudoku-by-L2G-20050714_solution.svg/250px-Sudoku-by-L2G-20050714_solution.svg.png" style="height:250px; width:250px" />
22+
image::https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Sudoku-by-L2G-20050714_solution.svg/250px-Sudoku-by-L2G-20050714_solution.svg.png[]
2323

2424

2525
[.small]#...and its solution numbers marked in red.#

docs/0042-trapping-rain-water.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ https://leetcode.com/problems/trapping-rain-water/[LeetCode - Trapping Rain Wate
44

55
Given _n_ non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
66

7-
<img src="https://assets.leetcode.com/uploads/2018/10/22/rainwatertrap.png" style="width: 412px; height: 161px;" />
7+
image::https://assets.leetcode.com/uploads/2018/10/22/rainwatertrap.png[]
88

99

1010
[.small]#The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped. *Thanks Marcos* for contributing this image!#

docs/0051-n-queens.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ image::images/0051-2.png[]
5252

5353
The _n_-queens puzzle is the problem of placing _n_ queens on an _n_&times;_n_ chessboard such that no two queens attack each other.
5454

55-
<img alt="" src="https://assets.leetcode.com/uploads/2018/10/12/8-queens.png" style="width: 258px; height: 276px;" />
55+
image::https://assets.leetcode.com/uploads/2018/10/12/8-queens.png[]
5656

5757
Given an integer _n_, return all distinct solutions to the _n_-queens puzzle.
5858

docs/0052-n-queens-ii.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Explanation: There are two distinct solutions to the 4-queens puzzle as shown be
3232

3333
The _n_-queens puzzle is the problem of placing _n_ queens on an _n_&times;_n_ chessboard such that no two queens attack each other.
3434

35-
<img src="https://assets.leetcode.com/uploads/2018/10/12/8-queens.png" style="width: 258px; height: 276px;" />
35+
image::https://assets.leetcode.com/uploads/2018/10/12/8-queens.png[]
3636

3737
Given an integer _n_, return the number of distinct solutions to the _n_-queens puzzle.
3838

docs/0062-unique-paths.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The robot can only move either down or right at any point in time. The robot is
88

99
How many possible unique paths are there?
1010

11-
<img src="https://assets.leetcode.com/uploads/2018/10/22/robot_maze.png" style="width: 400px; height: 183px;" />
11+
image::https://assets.leetcode.com/uploads/2018/10/22/robot_maze.png[]
1212

1313

1414
[.small]#Above is a 7 x 3 grid. How many possible unique paths are there?#

docs/0063-unique-paths-ii.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The robot can only move either down or right at any point in time. The robot is
88

99
Now consider if some obstacles are added to the grids. How many unique paths would there be?
1010

11-
<img src="https://assets.leetcode.com/uploads/2018/10/22/robot_maze.png" style="width: 400px; height: 183px;" />
11+
image::https://assets.leetcode.com/uploads/2018/10/22/robot_maze.png[]
1212

1313
An obstacle and empty space is marked as `1` and `0` respectively in the grid.
1414

docs/0084-largest-rectangle-in-histogram.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ Given _n_ non-negative integers representing the histogram's bar height where th
66

77

88

9-
<img src="https://assets.leetcode.com/uploads/2018/10/12/histogram.png" style="width: 188px; height: 204px;" />
9+
image::https://assets.leetcode.com/uploads/2018/10/12/histogram.png[]
1010

1111

1212
[.small]#Above is a histogram where width of each bar is 1, given height = `[2,1,5,6,2,3]`.#
1313

1414

1515

16-
<img src="https://assets.leetcode.com/uploads/2018/10/12/histogram_area.png" style="width: 188px; height: 204px;" />
16+
image::https://assets.leetcode.com/uploads/2018/10/12/histogram_area.png[]
1717

1818

1919
[.small]#The largest rectangle is shown in the shaded area, which has area = `10` unit.#

docs/0118-pascals-triangle.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ https://leetcode.com/problems/pascals-triangle/[LeetCode - Pascal's Triangle]
44

55
Given a non-negative integer _numRows_, generate the first _numRows_ of Pascal's triangle.
66

7-
<img alt="" src="https://upload.wikimedia.org/wikipedia/commons/0/0d/PascalTriangleAnimated2.gif" style="height:240px; width:260px" />
7+
image::https://upload.wikimedia.org/wikipedia/commons/0/0d/PascalTriangleAnimated2.gif[]
88

99

1010
[.small]#In Pascal's triangle, each number is the sum of the two numbers directly above it.#

docs/0119-pascals-triangle-ii.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Given a non-negative index _k_ where _k_ ≤ 33, return the _k_^th^ index row of
66

77
Note that the row index starts from 0.
88

9-
<img alt="" src="https://upload.wikimedia.org/wikipedia/commons/0/0d/PascalTriangleAnimated2.gif" />
9+
image::https://upload.wikimedia.org/wikipedia/commons/0/0d/PascalTriangleAnimated2.gif[]
1010

1111

1212
[.small]#In Pascal's triangle, each number is the sum of the two numbers directly above it.#

docs/0133-clone-graph.adoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ The given node will always be the first node with `val = 1`. You must return the
2828

2929

3030
*Example 1:*
31-
<img alt="" src="https://assets.leetcode.com/uploads/2019/11/04/133_clone_graph_question.png" style="width: 500px; height: 550px;" />
31+
32+
image::https://assets.leetcode.com/uploads/2019/11/04/133_clone_graph_question.png[]
33+
3234
[subs="verbatim,quotes"]
3335
----
3436
*Input:* adjList = [[2,4],[1,3],[2,4],[1,3]]
@@ -41,7 +43,9 @@ The given node will always be the first node with `val = 1`. You must return the
4143
----
4244

4345
*Example 2:*
44-
<img alt="" src="https://assets.leetcode.com/uploads/2020/01/07/graph.png" style="width: 163px; height: 148px;" />
46+
47+
image::https://assets.leetcode.com/uploads/2020/01/07/graph.png[]
48+
4549
[subs="verbatim,quotes"]
4650
----
4751
*Input:* adjList = [[]]
@@ -59,7 +63,9 @@ The given node will always be the first node with `val = 1`. You must return the
5963
----
6064

6165
*Example 4:*
62-
<img alt="" src="https://assets.leetcode.com/uploads/2020/01/07/graph-1.png" style="width: 272px; height: 133px;" />
66+
67+
image::https://assets.leetcode.com/uploads/2020/01/07/graph-1.png[]
68+
6369
[subs="verbatim,quotes"]
6470
----
6571
*Input:* adjList = [[2],[1]]

docs/0138-copy-list-with-random-pointer.adoc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,19 @@ The Linked List is represented in the input/output as a list of `n` nodes. Each
3131
3232
3333
*Example 1:*
34-
<img alt="" src="https://assets.leetcode.com/uploads/2019/12/18/e1.png" style="width: 700px; height: 142px;" />
34+
35+
image::https://assets.leetcode.com/uploads/2019/12/18/e1.png[]
36+
3537
[subs="verbatim,quotes"]
3638
----
3739
*Input:* head = [[7,null],[13,0],[11,4],[10,2],[1,0]]
3840
*Output:* [[7,null],[13,0],[11,4],[10,2],[1,0]]
3941
----
4042

4143
*Example 2:*
42-
<img alt="" src="https://assets.leetcode.com/uploads/2019/12/18/e2.png" style="width: 700px; height: 114px;" />
44+
45+
image::https://assets.leetcode.com/uploads/2019/12/18/e2.png[]
46+
4347
[subs="verbatim,quotes"]
4448
----
4549
*Input:* head = [[1,1],[2,1]]
@@ -48,7 +52,7 @@ The Linked List is represented in the input/output as a list of `n` nodes. Each
4852

4953
*Example 3:*
5054

51-
*<img alt="" src="https://assets.leetcode.com/uploads/2019/12/18/e3.png" style="width: 700px; height: 122px;" />*
55+
*image::https://assets.leetcode.com/uploads/2019/12/18/e3.png[]*
5256

5357
[subs="verbatim,quotes"]
5458
----

docs/0141-linked-list-cycle.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To represent a cycle in the given linked list, we use an integer `pos` which rep
2222

2323

2424

25-
<img alt="" src="https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist.png" style="width: 300px; height: 97px; margin-top: 8px; margin-bottom: 8px;" />
25+
image::https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist.png[]
2626

2727
*Example 2:*
2828

@@ -35,7 +35,7 @@ To represent a cycle in the given linked list, we use an integer `pos` which rep
3535

3636

3737

38-
<img alt="" src="https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist_test2.png" style="width: 141px; height: 74px;" />
38+
image::https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist_test2.png[]
3939

4040
*Example 3:*
4141

@@ -47,7 +47,7 @@ To represent a cycle in the given linked list, we use an integer `pos` which rep
4747
----
4848

4949

50-
<img alt="" src="https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist_test3.png" style="width: 45px; height: 45px;" />
50+
image::https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist_test3.png[]
5151

5252

5353

docs/0142-linked-list-cycle-ii.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ To represent a cycle in the given linked list, we use an integer `pos` which rep
9191
*Explanation:* There is a cycle in the linked list, where tail connects to the second node.
9292
----
9393

94-
<img alt="" src="https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist.png" style="height: 97px; width: 300px;" />
94+
image::https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist.png[]
9595

9696
*Example 2:*
9797

@@ -102,7 +102,7 @@ To represent a cycle in the given linked list, we use an integer `pos` which rep
102102
*Explanation:* There is a cycle in the linked list, where tail connects to the first node.
103103
----
104104

105-
<img alt="" src="https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist_test2.png" style="height: 74px; width: 141px;" />
105+
image::https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist_test2.png[]
106106

107107
*Example 3:*
108108

@@ -113,7 +113,7 @@ To represent a cycle in the given linked list, we use an integer `pos` which rep
113113
*Explanation:* There is no cycle in the linked list.
114114
----
115115

116-
<img alt="" src="https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist_test3.png" style="height: 45px; width: 45px;" />
116+
image::https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist_test3.png[]
117117

118118

119119

docs/0147-insertion-sort-list.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Sort a linked list using insertion sort.
77

88

99

10-
<img alt="" src="https://upload.wikimedia.org/wikipedia/commons/0/0f/Insertion-sort-example-300px.gif" style="height:180px; width:300px" />
10+
image::https://upload.wikimedia.org/wikipedia/commons/0/0f/Insertion-sort-example-300px.gif[]
1111

1212

1313
[.small]#A graphical example of insertion sort. The partial sorted list (black) initially contains only the first element in the list.

docs/0160-intersection-of-two-linked-lists.adoc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ image::images/0160-4.png[]
1515
Write a program to find the node at which the intersection of two singly linked lists begins.
1616

1717
For example, the following two linked lists:
18-
<a href="https://assets.leetcode.com/uploads/2018/12/13/160_statement.png" target="_blank"><img alt="" src="https://assets.leetcode.com/uploads/2018/12/13/160_statement.png" style="margin-top: 10px; margin-bottom: 10px; width: 400px; height: 130px;" /></a>
18+
19+
image::https://assets.leetcode.com/uploads/2018/12/13/160_statement.png[]
1920

2021
begin to intersect at node c1.
2122

2223

2324

2425
*Example 1:*
25-
<a href="https://assets.leetcode.com/uploads/2018/12/13/160_example_1.png" target="_blank"><img alt="" src="https://assets.leetcode.com/uploads/2018/12/13/160_example_1.png" style="margin-top: 10px; margin-bottom: 10px; width: 400px; height: 130px;" /></a>
26+
27+
image::https://assets.leetcode.com/uploads/2018/12/13/160_example_1.png[]
2628

2729
[subs="verbatim,quotes"]
2830
----
@@ -34,7 +36,8 @@ begin to intersect at node c1.
3436

3537

3638
*Example 2:*
37-
<a href="https://assets.leetcode.com/uploads/2018/12/13/160_example_2.png" target="_blank"><img alt="" src="https://assets.leetcode.com/uploads/2018/12/13/160_example_2.png" style="margin-top: 10px; margin-bottom: 10px; width: 350px; height: 136px;" /></a>
39+
40+
image::https://assets.leetcode.com/uploads/2018/12/13/160_example_2.png[]
3841

3942
[subs="verbatim,quotes"]
4043
----
@@ -47,7 +50,8 @@ begin to intersect at node c1.
4750

4851

4952
*Example 3:*
50-
<a href="https://assets.leetcode.com/uploads/2018/12/13/160_example_3.png" target="_blank"><img alt="" src="https://assets.leetcode.com/uploads/2018/12/13/160_example_3.png" style="margin-top: 10px; margin-bottom: 10px; width: 200px; height: 126px;" /></a>
53+
54+
image::https://assets.leetcode.com/uploads/2018/12/13/160_example_3.png[]
5155

5256
[subs="verbatim,quotes"]
5357
----

docs/0173-binary-search-tree-iterator.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Calling `next()` will return the next smallest number in the BST.
1313

1414
*Example:*
1515

16-
*<img alt="" src="https://assets.leetcode.com/uploads/2018/12/25/bst-tree.png" style="width: 189px; height: 178px;" />*
16+
image::https://assets.leetcode.com/uploads/2018/12/25/bst-tree.png[]
1717

1818
[subs="verbatim,quotes"]
1919
----

docs/0218-the-skyline-problem.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
https://leetcode.com/problems/the-skyline-problem/[LeetCode - The Skyline Problem]
44

55
A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you are *given the locations and height of all the buildings* as shown on a cityscape photo (Figure A), write a program to *output the skyline* formed by these buildings collectively (Figure B).
6-
<a href="/static/images/problemset/skyline1.jpg" target="_blank"><img alt="Buildings" src="https://assets.leetcode.com/uploads/2018/10/22/skyline1.png" style="max-width: 45%; border-width: 0px; border-style: solid;" /> </a> <a href="/static/images/problemset/skyline2.jpg" target="_blank"> <img alt="Skyline Contour" src="https://assets.leetcode.com/uploads/2018/10/22/skyline2.png" style="max-width: 45%; border-width: 0px; border-style: solid;" /> </a>
6+
7+
image::https://assets.leetcode.com/uploads/2018/10/22/skyline1.png[] </a> <a href="/static/images/problemset/skyline2.jpg" target="_blank"> image::https://assets.leetcode.com/uploads/2018/10/22/skyline2.png[]
78

89
The geometric information of each building is represented by a triplet of integers `[Li, Ri, Hi]`, where `Li` and `Ri` are the x coordinates of the left and right edge of the ith building, respectively, and `Hi` is its height. It is guaranteed that `0 ≤ Li, Ri ≤ INT_MAX`, `0 < Hi ≤ INT_MAX`, and `Ri - Li > 0`. You may assume all buildings are perfect rectangles grounded on an absolutely flat surface at height 0.
910

docs/0223-rectangle-area.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Find the total area covered by two *rectilinear* rectangles in a *2D* plane.
66

77
Each rectangle is defined by its bottom left corner and top right corner as shown in the figure.
88

9-
<img alt="Rectangle Area" src="https://assets.leetcode.com/uploads/2018/10/22/rectangle_area.png" style="width: 542px; height: 304px;" />
9+
image::https://assets.leetcode.com/uploads/2018/10/22/rectangle_area.png[]
1010

1111
*Example:*
1212

docs/0235-lowest-common-ancestor-of-a-binary-search-tree.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Given a binary search tree (BST), find the lowest common ancestor (LCA) of two g
77
According to the https://en.wikipedia.org/wiki/Lowest_common_ancestor[definition of LCA on Wikipedia]: &ldquo;The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants (where we allow *a node to be a descendant of itself*).&rdquo;
88

99
Given binary search tree: root = [6,2,8,0,4,7,9,null,null,3,5]
10-
<img alt="" src="https://assets.leetcode.com/uploads/2018/12/14/binarysearchtree_improved.png" style="width: 200px; height: 190px;" />
10+
11+
image::https://assets.leetcode.com/uploads/2018/12/14/binarysearchtree_improved.png[]
1112

1213

1314
*Example 1:*

docs/0236-lowest-common-ancestor-of-a-binary-tree.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in
1717
According to the https://en.wikipedia.org/wiki/Lowest_common_ancestor[definition of LCA on Wikipedia]: &ldquo;The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants (where we allow *a node to be a descendant of itself*).&rdquo;
1818

1919
Given the following binary tree: root = [3,5,1,6,2,0,8,null,null,7,4]
20-
<img alt="" src="https://assets.leetcode.com/uploads/2018/12/14/binarytree.png" style="width: 200px; height: 190px;" />
20+
21+
image::https://assets.leetcode.com/uploads/2018/12/14/binarytree.png[]
2122

2223

2324
*Example 1:*

docs/0237-delete-node-in-a-linked-list.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Write a function to delete a node (except the tail) in a singly linked list, giv
1616

1717
Given linked list -- head = [4,5,1,9], which looks like following:
1818

19-
<img alt="" src="https://assets.leetcode.com/uploads/2018/12/28/237_example.png" style="margin-top: 5px; margin-bottom: 5px; width: 300px; height: 49px;" />
19+
image::https://assets.leetcode.com/uploads/2018/12/28/237_example.png[]
2020

2121

2222

docs/0304-range-sum-query-2d-immutable.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ https://leetcode.com/problems/range-sum-query-2d-immutable/[LeetCode - Range Sum
55
Given a 2D matrix _matrix_, find the sum of the elements inside the rectangle defined by its upper left corner (_row_1, _col_1) and lower right corner (_row_2, _col_2).
66
77
8-
<img src="/static/images/courses/range_sum_query_2d.png" border="0" alt="Range Sum Query 2D" />
8+
image::https://leetcode.com/static/images/courses/range_sum_query_2d.png[]
99
1010
1111
[.small]#The above rectangle (with the red border) is defined by (row1, col1) = *(2, 1)* and (row2, col2) = *(4, 3)*, which contains sum = *8*.#

0 commit comments

Comments
 (0)