Skip to content

Commit 54f2536

Browse files
authored
Update K Closest Points to Origin - Leetcode 973.py
1 parent a4888a6 commit 54f2536

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

K Closest Points to Origin - Leetcode 973.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ def dist(x, y):
1212
heapq.heappushpop(heap, (-d, x, y))
1313

1414
return [(x, y) for d, x, y in heap]
15+
16+
# Time Complexity: O(n log k)
17+
# Space Complexity: O(k)

0 commit comments

Comments
 (0)