알고리즘
-
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-10] Create Sorted Array through InstructionsIT/자기계발 ( Leetcode ) 2021. 1. 11. 00:14
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/580/week-2-january-8th-january-14th/3599/ 이번 문제는 이해가 조금 어려웠다.. ( 아직 필자는 답을 만들진 못했다.) 예시를 보며 문제를 이해해보자. 입력값으로 배열을 주어지면, 정렬을 하면서 생긴, cost 값에 대해서 최소값에 대해 합을 구하는 문제이다. cost라는 것의 비교값으로 주어지는 것들은 정렬을 하면서 정렬값이 되었을때, 왼쪽의 원소의 개수와 오른쪽의 원소의 개수이다. 1번 예시를 보며 이해해보자. 1) 첫번째 값 1을 넣으면 값이 하나이기에 양옆의 값은 0 , 0 min은 0이고, 2) 두번째 값 5를 넣으면 5는 1..
-
2021-01-09] Check If Two String Arrays are Equivalent & Duplicate ZerosIT/자기계발 ( Leetcode ) 2021. 1. 9. 00:00
오늘의 문제: leetcode.com/problems/check-if-two-string-arrays-are-equivalent/ Check If Two String Arrays are Equivalent - 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 leetcode.com/problems/duplicate-zeros/ Duplicate Zeros - LeetCode Level up your coding skills and quickly land a job...
-
2021-01-07] Kth Missing Positive NumberIT/자기계발 ( Leetcode ) 2021. 1. 7. 00:00
오늘의 문제: leetcode.com/problems/kth-missing-positive-number/ Kth Missing Positive 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 이번 문제도 이해는 쉬웠던 것 같다! 입력값으로 주는 arr에 값을 제외한 [1~1000] 이하의 List의 입력값 k번째의 값을 구하는 것이다! 예시를 보며 같이 이해해보자 입력값으로 [2,3,4,7,11] 이 주어졌으니 해당 내용을 제외한 [1~1000]의..
-
2021-01-06] Remove Duplicates from Sorted List IIIT/자기계발 ( Leetcode ) 2021. 1. 6. 23:45
하루하루.. 꾸준히 쓴다는 것은 정말 어렵다.. 문제 푸는 것도 그렇고, 그것을 정리하여 블로그로 남기는 것까지 할라니 쉽지가 않다.. 그래도 5일만에 무너질수없으니 오늘도 문제를 풀어봅시다. 오늘의 문제: leetcode.com/problems/remove-duplicates-from-sorted-list-ii/ Remove Duplicates from Sorted List II - 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 문제 자체는 쉽게 이해하였다! ..
-
2021-01-04] Beautiful ArrangementIT/자기계발 ( Leetcode ) 2021. 1. 4. 20:46
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/579/week-1-january-1st-january-7th/3591/ 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 알흠다운 배열... 문제 이해가 역시 쉽진 않은 바, 예시로 문제를 이해해보자. input N..
-
2021-01-03] Find a Corresponding Node of a Binary Tree in a Clone of That TreeIT/자기계발 ( Leetcode ) 2021. 1. 4. 00:32
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/579/week-1-january-1st-january-7th/3590/ Account Login - 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 처음 문제를 이해하는 데 진을 다 빼버려 정말 지쳐버렸다.. ( 영어가 어려운걸 떠나서, 문제를 이해 못했었음 ) 역시 예시로 주어진 내용으로 내가 이해한 바를 설명한다. 총 T..
-
2021-01-02] Check Array Formation Through ConcatenationIT/자기계발 ( Leetcode ) 2021. 1. 4. 00:14
신년부터 다시 자기계발을 하고자 글을 쓴다. ( 1월1일은 신정이니 한 번 봐주자.. 나 자신 ) 필자는 영어를 잘 못해서 Google님의 도움으로 문제를 읽고, 예시를 보며 문제를 이해한다. ( Thx, google.. ) 그리고, Python으로 문제를 풀고 있어 문제풀이의 경우 python문법으로 풀이한다. 오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/579/week-1-january-1st-january-7th/3589/ Account Login - LeetCode Level up your coding skills and quickly land a job. This is the best place to ..