일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 파이썬릿코드
- 파이썬 프로그래머스
- 상가수익률계산기
- 릿코드 파이썬
- 알고리즘풀이
- python xor
- 릿코드
- binary search
- python 릿코드
- python sorted
- 릿코드풀이
- 파이썬릿코드풀기
- 릿코드풀기
- python zip_longest
- 코틀린기초
- leetcode풀이
- 파이썬 알고리즘
- 알고리즘풀기
- LeetCode
- leetcode 풀기
- 파이썬알고리즘
- python Leetcode
- python priority queue
- python 알고리즘
- 파이썬 알고리즘 풀기
- leetcode풀기
- 파이썬알고리즘풀기
- 파이썬 릿코드
- 릿코드 풀기
- 잇츠디모
- Today
- Total
목록파이썬 알고리즘 (12)
소프트웨어에 대한 모든 것

2. Add Two Numbers https://leetcode.com/problems/add-two-numbers/ Add Two Numbers - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) bruto-force 풀이 순서: 1) 리스트를 array 자료구조로 변환 2) carry를 계산하면서 각 자리수 add 3) 최종 결과물 array를 리스트로 변환해서 리턴 # Definition for singly-linked list. # cla..

2120. Execution of All Suffix Instructions Staying in a Grid https://leetcode.com/problems/execution-of-all-suffix-instructions-staying-in-a-grid/ Execution of All Suffix Instructions Staying in a Grid - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) brute force 시간복잡도 : ..

287. Find the Duplicate Number https://leetcode.com/problems/find-the-duplicate-number/ Find the Duplicate Number - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) 정렬 정렬한 다음에 순차적으로 중복된 숫자를 찾습니다. class Solution: def findDuplicate(self, nums): nums = sorted(nums) for i in r..

2169. Count Operations to Obtain Zero https://leetcode.com/problems/count-operations-to-obtain-zero/ Count Operations to Obtain Zero - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) 재귀 의식의 흐름대로 풉니다. class Solution: def countOperations(self, num1: int, num2: int) -> int: ..

347. Top K Frequent Elements https://leetcode.com/problems/top-k-frequent-elements/ Top K Frequent Elements - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) Counter 객체 사용 class Solution: def topKFrequent(self, nums: List[int], k: int) -> List[int]: counter = Counter(nums..

121. Best Time to Buy and Sell Stock https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ Best Time to Buy and Sell Stock - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) Bruete-Force Brute-force 방식으로 풀면 시간 초과가 발생하네요. 시간 복잡도 : O(n^2) # Time Limit Exceeded class..

1288. Remove Covered Intervals https://leetcode.com/problems/remove-covered-intervals/ Remove Covered Intervals - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) class Solution: def removeCoveredIntervals(self, nums: List[List[int]]) -> int: count = len(nums) # 오름차순 정렬 nu..

559. Maximum Depth of N-ary Tree https://leetcode.com/problems/maximum-depth-of-n-ary-tree/ Maximum Depth of N-ary Tree - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) recursive """ # Definition for a Node. class Node: def __init__(self, val=None, children=None): self.v..