Skip to content

Commit 0cc056d

Browse files
longsizhuogithub-actions[bot]
authored andcommitted
chore(docs): sync doc metadata [skip ci]
1 parent 24b863f commit 0cc056d

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

app/docs/CommunityShare/Leetcode/[1333]餐厅过滤器_translated.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
---
22
title: 1333.Restaurant filter
3-
date: '2024.01.01 0:00'
3+
date: "2024.01.01 0:00"
44
tags:
55
- Python
66
- answer
77
- Sort
88
- Array
99
abbrlink: 7f1331bc
10+
docId: jcqhknk5z2xr3rfqn49me4j9
1011
---
12+
1113
# topic:
1214

13-
1415
[1333.Restaurant filter.md](https://leetcode-cn.com/problems/filter-restaurants-by-vegan-friendly-price-and-distance/)
1516

1617
# Thought:
18+
1719
This is the beginningpopThought,But time complexity is too high,400ms,It is later changed to a list derivative。
1820
I think of the senior said,pop()The running time is okay,But once the index is added inside,It will be particularly slow。
1921
sorted and lambda Usage:
2022
lambdayesPythonAnonymous function in。it's here,lambda x: (x[1], x[0])Definitions a acceptance of an elementx(in this case,xyesrestaurantsA list in the list)And return a tuple(x[1], x[0])The function。
2123

2224
this means,Sort首先基于每个子列表的第二个元素x[1],Then based on this basisx[0]。in other words,It first followsx[1]进行Sort,ifx[1]same,According tox[0]进行Sort。
25+
2326
```python
2427
while ind < len(restaurants):
2528
i = restaurants[ind]
@@ -34,6 +37,7 @@ while ind < len(restaurants):
3437
```
3538

3639
# Code:
40+
3741
```python
3842
class Solution:
3943
def filterRestaurants(self, restaurants: List[List[int]], veganFriendly: int, maxPrice: int, maxDistance: int) -> \
@@ -46,4 +50,4 @@ class Solution:
4650
]
4751
restaurants = sorted(restaurants, key=lambda x: (x[1], x[0]), reverse=True)
4852
return [i[0] for i in restaurants]
49-
```
53+
```

generated/doc-contributors.json

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"repo": "InvolutionHell/involutionhell",
3-
"generatedAt": "2025-11-18T03:06:32.801Z",
3+
"generatedAt": "2025-11-19T03:06:17.842Z",
44
"docsDir": "app/docs",
5-
"totalDocs": 117,
5+
"totalDocs": 118,
66
"results": [
77
{
88
"docId": "ue27z7z95yzw3lhhfj7nit1c",
@@ -2051,6 +2051,23 @@
20512051
}
20522052
]
20532053
},
2054+
{
2055+
"docId": "jcqhknk5z2xr3rfqn49me4j9",
2056+
"path": "app/docs/CommunityShare/Leetcode/[1333]餐厅过滤器_translated.md",
2057+
"contributorStats": {
2058+
"114939201": 1
2059+
},
2060+
"contributors": [
2061+
{
2062+
"githubId": "114939201",
2063+
"contributions": 1,
2064+
"lastContributedAt": "2025-11-19T03:00:06.000Z",
2065+
"login": "longsizhuo",
2066+
"avatarUrl": "https://avatars.githubusercontent.com/u/114939201?v=4",
2067+
"htmlUrl": "https://github.com/longsizhuo"
2068+
}
2069+
]
2070+
},
20542071
{
20552072
"docId": "rv6egbynttb4mt1n0412bue0",
20562073
"path": "app/docs/CommunityShare/Leetcode/[213]打家劫舍 II_translated.md",
@@ -2157,13 +2174,13 @@
21572174
"docId": "udm0daiek9dr22xq4doep5w4",
21582175
"path": "app/docs/CommunityShare/Leetcode/345. 反转字符串中的元音字母_translated.md",
21592176
"contributorStats": {
2160-
"114939201": 1
2177+
"114939201": 2
21612178
},
21622179
"contributors": [
21632180
{
21642181
"githubId": "114939201",
2165-
"contributions": 1,
2166-
"lastContributedAt": "2025-11-18T03:00:08.000Z",
2182+
"contributions": 2,
2183+
"lastContributedAt": "2025-11-18T03:06:33.000Z",
21672184
"login": "longsizhuo",
21682185
"avatarUrl": "https://avatars.githubusercontent.com/u/114939201?v=4",
21692186
"htmlUrl": "https://github.com/longsizhuo"

0 commit comments

Comments
 (0)