IT
-
2021-01-19] Longest Palindromic SubstringIT/자기계발 ( Leetcode ) 2021. 1. 19. 23:07
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/581/week-3-january-15th-january-21st/3609/ Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com Palindromic substring.. 구글 번역으로 회문 부분문자열.. 무슨 말인지 ..
-
2021-01-17] Count Sorted Vowel StringsSolutionIT/자기계발 ( Leetcode ) 2021. 1. 18. 21:26
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/581/week-3-january-15th-january-21st/3607/ Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com 실은 어제의 문제.. 날짜별로 푸는 문제라...ㅎㅎ 어쩔수가 없다 나에겐 이 문제는 실패했..
-
2021-01-18] Max Number of K-Sum PairsIT/자기계발 ( Leetcode ) 2021. 1. 18. 20:50
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/581/week-3-january-15th-january-21st/3608/ 오늘의 문제는 어렵게 생각하면 어렵고 쉽게 생각하면 쉬워지는 것 같다. 예시를 보며 생각해보자. 입력값으로 int형 리스트 nums와 target 값 k가 주어진다. nums의 원소 값 2개를 합하여 k를 만들어내면, pair 1개가 완성된다. 첫번째 예시처럼 [1,2,3,4] -> 첫번째 원소, 마지막 원소를 합하면 1+4 =5 즉 1개의 pair가 완성된다. 그러면 나머지를 제거하고 [2,3] 도 두개의 원소를 합하면 5가 되므로 pair가 총 2개라는 것을 알 수 있다. pair의 값을..
-
2021-01-16] Kth Largest Element in an ArrayIT/자기계발 ( Leetcode ) 2021. 1. 16. 18:40
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/581/week-3-january-15th-january-21st/3606/ Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com 문제 예시를 보며 이해해보자. 문제에서 말했듯 주어진 배열에서 k 번째로 큰 값을 구하면 ..
-
2020-01-15] Get Maximum in Generated ArrayIT/자기계발 ( Leetcode ) 2021. 1. 15. 21:50
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/581/week-3-january-15th-january-21st/3605/ Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com 간만에 기분좋게 문제를 풀어 마음이 좋구만. 예시를 보며 문제를 파악해보자. 입력값 n이 ..
-
2021-01-14] Boats to Save PeopleIT/자기계발 ( Leetcode ) 2021. 1. 14. 00:28
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/580/week-2-january-8th-january-14th/3602/ Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com 문제에 대해서 간단히 생각할땐 쉬웠는데, 막상 파고드니 어려워 죽는줄.. 문제 예시를 보며 ..
-
2021-01-13] Add Two NumbersIT/자기계발 ( Leetcode ) 2021. 1. 13. 12:41
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/580/week-2-january-8th-january-14th/3601/ 확실히 주말에 힘든 문제인것 같은 느낌이다! 다행이 오늘 문제도 풀 수 있었다~ 자 예시를 보며 문제를 이해하자. 입력 값으로 ListNode 2개를 준다. 그 값이 더해져 값을 넘겨주는 것. 설명을 보면 결국 ListNode의 합산된 값의 새로운 List를 달라는 말이다. 문제풀이 1차) list의 시작부터 l1의 첫번재값*10의0승 = 첫째자리의 값 을 이용하여, list 마다 가진 값을 만들고, 둘을 합해 역순으로 list를 만들어 보는 방법을 선택했다. # Definition for s..
-
2021-01-12] Merge Sorted ArrayIT/자기계발 ( Leetcode ) 2021. 1. 12. 00:00
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/580/week-2-january-8th-january-14th/3600/ 간만쓰 쉬운 문제였던것 같다..ㅎㅎ 주말엔 시간이 많을테니 어려운 문제를 주는지 토/일은 문제가 힘들어서 고통이었다ㅜ 이 문제는 array관련 문제로 예시를 보며 이해해보자. nums1의 길이는 두 list를 합칠만큼의 공간이 주어지고, 실제 값이 있는 길이는 m으로 주어진다. 이를 sort하여 값을 주면 완성. 주의할 점은 return값이 없고 주어진 nums1 list에 sort된 값을 넣어서 반환하면 된다. 문제풀이) class Solution(object): def merge(self,..