IT
-
2021-01-11] Valid SudokuIT/자기계발 ( Leetcode ) 2021. 1. 11. 18:52
오늘의 문제: leetcode.com/problems/valid-sudoku/ Valid Sudoku - 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 sudoku에 대해서 이해하고 있다면, 문제는 쉬울 것이다, 총 9X9 행렬이 주어지고, sudoku로써 맞는지 검증하는 문제이다. 예시의 그림을 보며 이해해 보자. sudoku의 조건은 결국 아래 2가지로 정리될 것 같다. 1) 각 n행,n열 각각 모든 숫자들이 1-9 까지 중복되지 않고 들어간다. 2) 각 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-08] Longest Substring Without Repeating CharactersIT/자기계발 ( Leetcode ) 2021. 1. 8. 00:00
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/579/week-1-january-1st-january-7th/3595/ 이번 문제는 한줄이지만, 한마디론 표현이 잘안되니 예시를 보며 이야기해보자. input값으로 문자열이 주어지고, 이 안에서 중복되는 값이 없는 substring의 최대 길이를 구하는 것이 문제이다. 예시 1처럼 "abcabcbb" 라면 "abc","bca","cab"가 가장 긴 substring이고 최대 길이는 3이다 문제풀이 ) class Solution(object): def lengthOfLongestSubstring(self, s): maxval=1 if s == "": return 0 ..
-
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-05] Merge Two Sorted ListsIT/자기계발 ( Leetcode ) 2021. 1. 5. 03:05
오늘의 문제: leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/579/week-1-january-1st-january-7th/3592/ 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 List를 오름 차순..
-
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..