일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 파이썬
- two-pointer
- gcp
- stratascratch
- array
- GenerativeAI
- heap
- 니트코드
- 코드업
- nlp
- 릿코드
- Stack
- 파이썬기초100제
- 생성형AI
- dfs
- 파이썬알고리즘
- 자연어처리
- sql코테
- 리트코드
- codeup
- GenAI
- 투포인터
- Python3
- slidingwindow
- Greedy
- Python
- SQL
- LeetCode
- 슬라이딩윈도우
- 알고리즘
Archives
- Today
- Total
목록2025/05/26 (1)
Tech for good

class Solution: def minMovesToSeat(self, seats: List[int], students: List[int]) -> int: students.sort(reverse=True) seats.sort(reverse=True) minMove = 0 for i in range(len(students)): minMove += abs(students[i] - seats[i]) return minMove✅ Why Use abs() (Absolute Value)?The problem asks for the total number of moves to align each student with a sea..
IT/Computer Science
2025. 5. 26. 22:42