일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Python Implementation
- attribute
- data science
- Python Code
- shiba
- concurrency
- 컴퓨터의 구조
- Regular Expression
- DWG
- 운영체제
- 43. Multiply Strings
- LeetCode
- Substring with Concatenation of All Words
- 파이썬
- 715. Range Module
- 30. Substring with Concatenation of All Words
- t1
- 109. Convert Sorted List to Binary Search Tree
- kaggle
- Protocol
- Convert Sorted List to Binary Search Tree
- 시바견
- 밴픽
- Decorator
- 프로그래머스
- 315. Count of Smaller Numbers After Self
- Class
- iterator
- Generator
- Python
Archives
- Today
- Total
목록시바견 (122)
Scribbling
33. Search in Rotated Sorted Array
class Solution: def search(self, nums: List[int], target: int) -> int: left, right = 0, len(nums) - 1 while left = nums[left]: if nums[left]
Computer Science/Coding Test
2021. 9. 11. 22:09
LeetCode: 31. Next Permutation
class Solution: def nextPermutation(self, nums: List[int]) -> None: i = len(nums) - 1 while i - 1 >= 0 and nums[i-1] >= nums[i]: i -= 1 if i == 0: return nums.sort() swap_idx, swap_val = None, int(1e9) for j in range(i, len(nums)): if nums[j] > nums[i-1] and nums[j] < swap_val: swap_val = nums[j] swap_idx = j nums[i-1], nums[swap_idx] = nums[swap_idx], nums[i-1] nums[i:] = sorted(nums[i:])
Computer Science/Coding Test
2021. 9. 9. 22:40