일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Dynamic Programming
- GKE
- docker
- Python
- 그리디
- k8s
- 알고리즘
- BubbleSort
- 백준
- go
- java
- KAKAO
- GCP
- kubernetes
- mobaXTerm
- cpu scheduling
- Observer Pattern
- Kotlin
- 피보나치
- github
- Codility
- 파이썬
- Backjoon
- LeetCode
- golang
- Programmers
- Top-down
- easy
- Singleton Pattern
- Today
- Total
목록알고리즘 (44)
To Be Developer
https://leetcode.com/problems/find-the-difference class Solution(object): def findTheDifference(self, s, t): # s의 알파벳을 key, 알파벳 수를 value 로 가지는 딕셔너리 dicS = {} # t의 알파벳을 key, 알파벳 수를 value 로 가지는 딕셔너리 dicT = {} # 시간 복잡도 O(N) # 공간 복잡도 O(N) for i in s: # 문자하나 카운트하여 dicS 에 대입 self.dicCount(dicS, i) # 시간 복잡도 O(M) for i in t: # 문자하나 카운트하여 dicT 에 대입 self.dicCount(dicT, i) # 시간 복잡도 O(M) for key, val in dic..
https://leetcode.com/problems/maximum-average-subarray-i/ Loading... 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 [Go 풀이] package main import "fmt" func main() { var nums = []int{4, 2, 1, 3, 3} fmt.Println(findMaxAverage(nums, 2)) } func findMaxAverage(nums []int, k int) float64 { // num..
https://leetcode.com/problems/find-pivot-index/ Loading... 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 [GoLang 풀이] package main import "fmt" func main() { a := []int{1, 7, 3, 6, 5, 6} fmt.Println(pivotIndex(a)) } func pivotIndex(nums []int) int { // nums의 길이 var numsLen int = len(nums) ..
https://leetcode.com/problems/repeated-substring-pattern/ LeetCode - The World's Leading Online Programming Learning Platform 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 [JAVA 풀이] class Solution { public boolean repeatedSubstringPattern(String s) { // 매개변수 s의 길이 int sLen = s.length(); /..
https://leetcode.com/problems/remove-duplicates-from-sorted-array/ Remove Duplicates from Sorted Array - 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 [GoLang 풀이] package main import "fmt" func main() { nums := []int{1, 1, 2} removeDuplicates(nums) } func removeDuplicates(nums []..
https://leetcode.com/problems/plus-one 불러오는 중입니다... [GoLang 풀이] package main import "fmt" func main() { a := []int{9, 9, 9} fmt.Println(plusOne(a)) } func plusOne(digits []int) []int { // 캐리 변수 var carry int = 1 // digits의 길이 var ln int = len(digits) // 결과값 Slice 변수 var result []int // digits를 마지막 인덱스부터 0번까지 반복 for i := ln - 1; i >= 0; i-- { // carry와 digits[i]를 더함 dig := digits[i] + carry // di..