Skip to content

Commit 87bbf6f

Browse files
committed
Updates leetcode/binary-search/497-random-point-in-non-overlapping-rectangles.md
Auto commit by GitBook Editor
1 parent 64cb4d8 commit 87bbf6f

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

leetcode/binary-search/497-random-point-in-non-overlapping-rectangles.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
Given a list of non-overlapping axis-aligned rectangles rects, write a function pick which randomly and uniformily picks an integer point in the space covered by the rectangles.
66

7-
**Note:**
8-
9-
1. An integer point is a point that has integer coordinates.
10-
2. A point on the perimeter of a rectangle is included in the space covered by the rectangles.
11-
3. ith rectangle = rects\[i\] = \[x1,y1,x2,y2\], where \[x1, y1\] are the integer coordinates of the bottom-left corner, and \[x2, y2\] are the integer coordinates of the top-right corner.
12-
4. length and width of each rectangle does not exceed 2000.
13-
5. 1 <= rects.length <= 100
14-
6. pick return a point as an array of integer coordinates \[p\_x, p\_y\]
7+
**Note:
8+
**
9+
10+
1. An integer point is a point that has integer coordinates.
11+
2. A point on the perimeter of a rectangle is included in the space covered by the rectangles.
12+
3. ith rectangle = rects\[i\] = \[x1,y1,x2,y2\], where \[x1, y1\] are the integer coordinates of the bottom-left corner, and \[x2, y2\] are the integer coordinates of the top-right corner.
13+
4. length and width of each rectangle does not exceed 2000.
14+
5. 1 <= rects.length <= 100
15+
6. pick return a point as an array of integer coordinates \[p\_x, p\_y\]
1516
7. pick is called at most 10000 times.
1617

1718
**Example 1:**
@@ -34,7 +35,8 @@ Output:
3435
[null,[-1,-2],[2,0],[-2,-1],[3,0],[-2,-2]]
3536
```
3637

37-
**Explanation of Input Syntax:**
38+
**Explanation of Input Syntax:
39+
**
3840

3941
The input is two lists: the subroutines called and their arguments. Solution's constructor has one argument, the array of rectangles rects. pick has no arguments. Arguments are always wrapped with a list, even if there aren't any.
4042

0 commit comments

Comments
 (0)