Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- list
- binary search
- 문자열
- backtracking
- Medium
- 재귀
- math
- easy
- tree
- 리트코드
- leetcode
- linked list
- Binary
- DP
- binary tree
- Python
- hash table
- string
- 미디움
- 이진트리
- 쉬움
- sorting
- Array
- 중간
- HashTable
- recursive
- matrix
- two pointers
- dfs
- Depth-first Search
Archives
- Today
- Total
목록Memorization (1)
부부의 코딩 성장 일기
LeetCode 70(Climbing Stairs, Python)
1. 문제 링크 https://leetcode.com/problems/climbing-stairs/ 2. 문제 설명 계단을 n steps에 거쳐 올라가며, 한번에 1 or 2 steps 씩밖에 오르지 못할 때, n개 계단을 오르는 방법의 수를 반환 예시1) n=2 이면 1step + 1step / 2steps 이렇게 두가지 방법이 가능하므로 2를 반환 예시2) n=3 이면 1step + 1step + 1step / 1step + 2steps / 2steps + 1steps 세 방법이 가능하므로 3을 반환 → 규칙을 찾아야하는 문제 3. 처음 풀이 2~7 steps 까지를 나열해보며 규칙을 찾았다. (물론 더 쉬운 규칙이 있었음) 3 step = 1 step으로 3번 움직이거나, 2step과 1step으로..
Algorithm/LeetCode
2023. 11. 11. 19:00