Skip to content

Commit 6d13e44

Browse files
Zanger67/leetcodeZanger67/leetcode
authored andcommitted
Updated markdown files
1 parent 5af615e commit 6d13e44

File tree

8 files changed

+80
-20
lines changed

8 files changed

+80
-20
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# **[LeetCode Records](https://leetcode.com/u/Zanger/)** (647 solved)
1+
# **[LeetCode Records](https://leetcode.com/u/Zanger/)** (648 solved)
22

33
<!-- This readme was generated using [WikiLeet](<https://github.com/Zanger67/WikiLeet>) -->
44

@@ -689,5 +689,6 @@ This repo is a collection of my LeetCode solutions, primarily written in Python,
689689
| 3396 | [Minimum Number of Operations to Make Elements in Array Distinct](<https://leetcode.com/problems/minimum-number-of-operations-to-make-elements-in-array-distinct>) | Easy | Daily | [solution](<markdowns/_3396. Minimum Number of Operations to Make Elements in Array Distinct.md>) | py |
690690
| 3443 | [Maximum Manhattan Distance After K Changes](<https://leetcode.com/problems/maximum-manhattan-distance-after-k-changes>) | Medium | Daily | [solution](<markdowns/_3443. Maximum Manhattan Distance After K Changes.md>) | py |
691691
| 3460 | [Longest Common Prefix After at Most One Removal](<https://leetcode.com/problems/longest-common-prefix-after-at-most-one-removal>) | Medium | | [solution](<markdowns/_3460. Longest Common Prefix After at Most One Removal.md>) | py |
692+
| 3516 | [Find Closest Person](<https://leetcode.com/problems/find-closest-person>) | Easy | Daily | [solution](<markdowns/_3516. Find Closest Person.md>) | go, py |
692693

693694
<p align="right"><i>This README was generated using <a href="https://github.com/Zanger67/WikiLeet">WikiLeet</a></i></p>

markdowns/Daily_Questions.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@
55
Dates are for the date I completed the question so due to the my time zone and how it lines up with UTC, it may be off by a day.
66

77
### September 2025
8-
| Su | Mo | Tu | We | Th | Fr | Sa |
9-
|-----:|--------------------------------------------:|-----------------------------------------------------------:|------------------------------------------------------------:|-----:|-----:|-----:|
10-
| | [1](<_1792. Maximum Average Pass Ratio.md>) | [2](<_3025. Find the Number of Ways to Place People I.md>) | [3](<_3027. Find the Number of Ways to Place People II.md>) | 4 | 5 | 6 |
11-
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
12-
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
13-
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
14-
| 28 | 29 | 30 | | | | |
8+
| Su | Mo | Tu | We | Th | Fr | Sa |
9+
|-----:|--------------------------------------------:|-----------------------------------------------------------:|------------------------------------------------------------:|-------------------------------------:|-----:|-----:|
10+
| | [1](<_1792. Maximum Average Pass Ratio.md>) | [2](<_3025. Find the Number of Ways to Place People I.md>) | [3](<_3027. Find the Number of Ways to Place People II.md>) | [4](<_3516. Find Closest Person.md>) | 5 | 6 |
11+
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
12+
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
13+
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
14+
| 28 | 29 | 30 | | | | |
1515

1616

1717

1818
| # | Title | Level | Cats | Solution | Languages | Date Complete |
1919
|-----:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------|:---------------|:----------------------------------------------------------------------------------------------------|:-----------------------------|:----------------|
20+
| 3516 | [Find Closest Person](<https://leetcode.com/problems/find-closest-person>) | Easy | Daily | [solution](<_3516. Find Closest Person.md>) | go, py | Sep 04, 2025 |
2021
| 3027 | [Find the Number of Ways to Place People II](<https://leetcode.com/problems/find-the-number-of-ways-to-place-people-ii>) | Hard | Daily | [solution](<_3027. Find the Number of Ways to Place People II.md>) | py | Sep 03, 2025 |
2122
| 3025 | [Find the Number of Ways to Place People I](<https://leetcode.com/problems/find-the-number-of-ways-to-place-people-i>) | Medium | Daily | [solution](<_3025. Find the Number of Ways to Place People I.md>) | py | Sep 02, 2025 |
2223
| 1792 | [Maximum Average Pass Ratio](<https://leetcode.com/problems/maximum-average-pass-ratio>) | Medium | Daily | [solution](<_1792. Maximum Average Pass Ratio.md>) | py | Sep 01, 2025 |
@@ -362,11 +363,11 @@ Dates are for the date I completed the question so due to the my time zone and h
362363

363364

364365
### September 2025
365-
| Su | Mo | Tu | We | Th | Fr | Sa |
366-
|-----:|--------------------------------------------:|-----------------------------------------------------------:|------------------------------------------------------------:|-----:|-----:|-----:|
367-
| | [1](<_1792. Maximum Average Pass Ratio.md>) | [2](<_3025. Find the Number of Ways to Place People I.md>) | [3](<_3027. Find the Number of Ways to Place People II.md>) | 4 | 5 | 6 |
368-
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
369-
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
370-
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
371-
| 28 | 29 | 30 | | | | |
366+
| Su | Mo | Tu | We | Th | Fr | Sa |
367+
|-----:|--------------------------------------------:|-----------------------------------------------------------:|------------------------------------------------------------:|-------------------------------------:|-----:|-----:|
368+
| | [1](<_1792. Maximum Average Pass Ratio.md>) | [2](<_3025. Find the Number of Ways to Place People I.md>) | [3](<_3027. Find the Number of Ways to Place People II.md>) | [4](<_3516. Find Closest Person.md>) | 5 | 6 |
369+
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
370+
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
371+
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
372+
| 28 | 29 | 30 | | | | |
372373

markdowns/Easy.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Easy Questions (187)
1+
# Easy Questions (188)
22

33
*[Back to top](<../README.md>)*
44

@@ -192,4 +192,5 @@
192192
| 3242 | [Design Neighbor Sum Service](<https://leetcode.com/problems/design-neighbor-sum-service>) | Easy | | [solution](<_3242. Design Neighbor Sum Service.md>) | py | Aug 04, 2024 |
193193
| 3248 | [Snake in Matrix](<https://leetcode.com/problems/snake-in-matrix>) | Easy | | [solution](<_3248. Snake in Matrix.md>) | py | Aug 12, 2024 |
194194
| 3392 | [Count Subarrays of Length Three With a Condition](<https://leetcode.com/problems/count-subarrays-of-length-three-with-a-condition>) | Easy | Daily | [solution](<_3392. Count Subarrays of Length Three With a Condition.md>) | py | Apr 27, 2025 |
195-
| 3396 | [Minimum Number of Operations to Make Elements in Array Distinct](<https://leetcode.com/problems/minimum-number-of-operations-to-make-elements-in-array-distinct>) | Easy | Daily | [solution](<_3396. Minimum Number of Operations to Make Elements in Array Distinct.md>) | py | Apr 08, 2025 |
195+
| 3396 | [Minimum Number of Operations to Make Elements in Array Distinct](<https://leetcode.com/problems/minimum-number-of-operations-to-make-elements-in-array-distinct>) | Easy | Daily | [solution](<_3396. Minimum Number of Operations to Make Elements in Array Distinct.md>) | py | Apr 08, 2025 |
196+
| 3516 | [Find Closest Person](<https://leetcode.com/problems/find-closest-person>) | Easy | Daily | [solution](<_3516. Find Closest Person.md>) | go, py | Sep 04, 2025 |

markdowns/Questions_By_Code_Length.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ Calculations are based on the code files's byte sizes.
546546
| 3228 | Weekly Contest 407 - q3 - [Maximum Number of Operations to Move Ones to the End](<https://leetcode.com/problems/maximum-number-of-operations-to-move-ones-to-the-end>) | Medium | Contest | [solution](<_3228. Maximum Number of Operations to Move Ones to the End.md>) | py | Jul 21, 2024 |
547547
| 196 | [Delete Duplicate Emails](<https://leetcode.com/problems/delete-duplicate-emails>) | Easy | | [solution](<_196. Delete Duplicate Emails.md>) | py, sql | Jun 07, 2024 |
548548
| 2529 | [Maximum Count of Positive Integer and Negative Integer](<https://leetcode.com/problems/maximum-count-of-positive-integer-and-negative-integer>) | Easy | Daily | [solution](<_2529. Maximum Count of Positive Integer and Negative Integer.md>) | py | Mar 12, 2025 |
549+
| 3516 | [Find Closest Person](<https://leetcode.com/problems/find-closest-person>) | Easy | Daily | [solution](<_3516. Find Closest Person.md>) | go, py | Sep 04, 2025 |
549550
| 781 | [Rabbits in Forest](<https://leetcode.com/problems/rabbits-in-forest>) | Medium | Daily | [solution](<_781. Rabbits in Forest.md>) | py | Apr 21, 2025 |
550551
| 2365 | [Task Scheduler II](<https://leetcode.com/problems/task-scheduler-ii>) | Medium | | [solution](<_2365. Task Scheduler II.md>) | py | Jun 29, 2024 |
551552
| 104 | [Maximum Depth of Binary Tree](<https://leetcode.com/problems/maximum-depth-of-binary-tree>) | Easy | B75, N150 | [solution](<_104. Maximum Depth of Binary Tree.md>) | py | Jul 04, 2024 |

markdowns/Questions_By_Recent.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Calculations are based on the date of the first solve.
66

77
| # | Title | Level | Cats | Solution | Languages | Date Complete |
88
|-----:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------|:--------------------------|:----------------------------------------------------------------------------------------------------|:--------------------------------------------|:----------------|
9+
| 3516 | [Find Closest Person](<https://leetcode.com/problems/find-closest-person>) | Easy | Daily | [solution](<_3516. Find Closest Person.md>) | go, py | Sep 04, 2025 |
910
| 3027 | [Find the Number of Ways to Place People II](<https://leetcode.com/problems/find-the-number-of-ways-to-place-people-ii>) | Hard | Daily | [solution](<_3027. Find the Number of Ways to Place People II.md>) | py | Sep 03, 2025 |
1011
| 3025 | [Find the Number of Ways to Place People I](<https://leetcode.com/problems/find-the-number-of-ways-to-place-people-i>) | Medium | Daily | [solution](<_3025. Find the Number of Ways to Place People I.md>) | py | Sep 02, 2025 |
1112
| 1792 | [Maximum Average Pass Ratio](<https://leetcode.com/problems/maximum-average-pass-ratio>) | Medium | Daily | [solution](<_1792. Maximum Average Pass Ratio.md>) | py | Sep 01, 2025 |

markdowns/Topics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- [Hash Table](<by_topic/Hash Table.md>) (146 completed)
1010
- [Depth-First Search](<by_topic/Depth-First Search.md>) (105 completed)
1111
- [Tree](<by_topic/Tree.md>) (91 completed)
12-
- [Math](<by_topic/Math.md>) (88 completed)
12+
- [Math](<by_topic/Math.md>) (89 completed)
1313
- [Binary Tree](<by_topic/Binary Tree.md>) (82 completed)
1414
- [Sorting](<by_topic/Sorting.md>) (78 completed)
1515
- [Breadth-First Search](<by_topic/Breadth-First Search.md>) (73 completed)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# 3516. [Find Closest Person](<https://leetcode.com/problems/find-closest-person>)
2+
3+
*All prompts are owned by LeetCode. To view the prompt, click the title link above.*
4+
5+
*[Back to top](<../README.md>)*
6+
7+
------
8+
9+
> *First completed : September 04, 2025*
10+
>
11+
> *Last updated : September 04, 2025*
12+
13+
------
14+
15+
> **Related Topics** : **[Math](<by_topic/Math.md>)**
16+
>
17+
> **Acceptance Rate** : **83.34 %**
18+
19+
------
20+
21+
## Solutions
22+
23+
- [e3516.go](<../my-submissions/e3516.go>)
24+
- [e3516.py](<../my-submissions/e3516.py>)
25+
### Go
26+
#### [e3516.go](<../my-submissions/e3516.go>)
27+
```Go
28+
func findClosest(x int, y int, z int) int {
29+
a, b := x - z, y - z
30+
if a < 0 {
31+
a *= -1
32+
}
33+
if b < 0 {
34+
b *= -1
35+
}
36+
37+
if a == b {
38+
return 0
39+
}
40+
if a < b {
41+
return 1
42+
}
43+
return 2
44+
}
45+
```
46+
47+
### Python
48+
#### [e3516.py](<../my-submissions/e3516.py>)
49+
```Python
50+
class Solution:
51+
def findClosest(self, x: int, y: int, z: int) -> int:
52+
return 0 if (a := abs(x - z)) == (b := abs(y - z)) else 1 if a < b else 2
53+
```
54+

0 commit comments

Comments
 (0)