IT/자기계발 ( Leetcode )
-
2021-01-21] Find the Most Competitive SubsequenceIT/자기계발 ( Leetcode ) 2021. 1. 22. 01:16
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/581/week-3-january-15th-january-21st/3611/ 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 문제의 난이도는 Medium인데 나에겐 왤케 어려운지.. 문제를 풀려고만 하지말고, 알고리..
-
2021-01-20] Valid ParenthesesIT/자기계발 ( Leetcode ) 2021. 1. 20. 23:27
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/581/week-3-january-15th-january-21st/3610/ 문제 예시를 보며 설명해보자. 입력값으로 주어지는 문자열은 소, 중, 대 괄호만으로로 이뤄진다. 주어진 값에 대해서 괄호가 잘 닫혔는지, 이상은 없는지 확인하는 문제이다. 각 괄호들로 알맞게 닫혀져있는지 확인하여 참 ,거짓을 판별하자. 먼저, 실패조건을 생각해본다. 1) 주어진 문자열의 길이는 무조건 짝수여야한다. ( 쌍으로 열고 닫히기 때문에 ) if len(s)%2==1: # 주어진 s의 길이가 홀수면 False return False 2) 닫히는 괄호가 먼저 나오면 무조건 실패 ( 예시..
-
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 문제에 대해서 간단히 생각할땐 쉬웠는데, 막상 파고드니 어려워 죽는줄.. 문제 예시를 보며 ..