| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- LEVEL 2
- swift
- Python
- First Unique Character in a String
- 알고리즘
- Kubernetes
- C++
- Code Jam
- 2022
- 프로그래머스
- 파이썬
- Algorithm
- GitLab
- K8S
- ProblemSoving
- 하늘과 바람과 별과 시
- 리트코드
- Code Jam 2022
- ProblemSolving
- leetcode
- Count Monobit Integers
- MySQL
- 코딩테스트
- hackerrank
- 문제해결
- 해커랭크
- 하늘과 바람과 별과 詩
- 3D PRINTING
- Qualification Round
- Today
- Total
목록Programming Language (90)
공대생의 비망록
멍청한 풀이: 시간복잡도 O(n^2)class Solution: def moveZeroes(self, nums: List[int]) -> None: """ Do not return anything, modify nums in-place instead. """ i = len(nums) - 1; j = 0; zeros = 0; moved = 0 while i >= 0: if nums[i] != 0: zeros += 1 i -= 1 else: if zeros == 0: # if there's 0 at the end of th..
class Solution: def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None: """ Do not return anything, modify nums1 in-place instead. """ if n == 0: return if m == 0: # nums1 = nums2 # This will not meet the in-place requirement for i in range(n): # To meet the in-place requirement nums1[i] = ..
중첩 for-loop 활용 방법: class Solution: def containsDuplicate(self, nums: List[int]) -> bool: for i in range(len(nums)): for j in range(i + 1, len(nums)): if nums[i] == nums[j]: return True return False 집합 (Set) 자료구조 활용 방법: class Solution: def containsDuplicate(self, nums: List[int]) -> bool: exists = set() for num in nums..
중첩 for-loop 사용: class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: for i in range(len(nums)): for j in range (i + 1, len(nums)): if nums[i] + nums[j] == target: return [i, j]시간복잡도 개선을 위해 Dictionary 자료구조를 활용하는 방식: class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: desiredTarget = {..
https://programmers.co.kr/learn/courses/30/lessons/42746 코딩테스트 연습 - 가장 큰 수 0 또는 양의 정수가 주어졌을 때, 정수를 이어 붙여 만들 수 있는 가장 큰 수를 알아내 주세요. 예를 들어, 주어진 정수가 [6, 10, 2]라면 [6102, 6210, 1062, 1026, 2610, 2106]를 만들 수 있고, 이중 가장 큰 programmers.co.kr 풀이는 추후에 차차 올리도록 하겠습니다... Swift로도 푼 문제! Swift 풀이 : https://youngdeveloper.tistory.com/146 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include #include ..
https://programmers.co.kr/learn/courses/30/lessons/42746 코딩테스트 연습 - 가장 큰 수 0 또는 양의 정수가 주어졌을 때, 정수를 이어 붙여 만들 수 있는 가장 큰 수를 알아내 주세요. 예를 들어, 주어진 정수가 [6, 10, 2]라면 [6102, 6210, 1062, 1026, 2610, 2106]를 만들 수 있고, 이중 가장 큰 programmers.co.kr 풀이는 추후에 차차 올리도록 하겠습니다... C++로도 푼 문제! C++ 풀이 : https://youngdeveloper.tistory.com/147 1 2 3 4 5 6 7 8 9 10 11 12 import Foundation func solution(_ numbers:[Int]) -> Str..
https://programmers.co.kr/learn/courses/30/lessons/42578 코딩테스트 연습 - 위장 programmers.co.kr C++로도 푼 문제! C++ 풀이 : https://youngdeveloper.tistory.com/144 [C++][Lv. 2] 위장 C++ 풀이 https://programmers.co.kr/learn/courses/30/lessons/42578 코딩테스트 연습 - 위장 programmers.co.kr 풀이는 추후에 차차 올리도록 하겠습니다... 1 2 3 4 5 6 7 8.. youngdeveloper.tistory.com 풀이는 추후에 차차 올리도록 하겠습니다... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ..
https://programmers.co.kr/learn/courses/30/lessons/42578 코딩테스트 연습 - 위장 programmers.co.kr 풀이는 추후에 차차 올리도록 하겠습니다... Swift로도 푼 문제! Swift 풀이 : https://youngdeveloper.tistory.com/145 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 #include #include #include #include using namespace std; int solution(vector clothes) { int an..
