본문 바로가기
728x90
반응형

‼ ERROR RECORD40

Leetcode 2389. Longest Subsequence with Limited Sum (Binary Search, Prefix Sum) https://leetcode.com/problems/longest-subsequence-with-limited-sum/description/ Longest Subsequence With Limited Sum - 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 난이도 easy이지만 생각할거리가 있는 문제를 가지고 왔습니다. .. 2022. 12. 25.
Leetcode 65. Valid Number (조건검색, 정규표현식) https://leetcode.com/problems/valid-number/description/ Valid 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 오랜만에 포스팅하는 에러 코드 입니다! 이번에는 다양한 조건을 정규표현식, 그리고 boolean을 활용해 구현한 기발한 코드들을 Leetcode에서 가져왔습니다. 코드 자체가 창의적이고 인상깊어서 공부를 위한 기록으로 남깁니다 :) 1. 정규표현식 match 사용 class Solution:.. 2022. 12. 6.
Leetcode 37 스도쿠 문제 풀이 정리 https://leetcode.com/problems/sudoku-solver/ Sudoku Solver - 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에서 다시 만났습니다 스도쿠의 규칙을 어떤 식으로 적용했는지를 중심으로 여러 풀이를 분석해보겠습니다 깔끔한 Back Tracking 풀이 ) class Solution: def solveSudoku(self, board: List[.. 2022. 11. 19.
Leetcode 295. Find Median (heapq 힙큐로 중간값 구하기) https://leetcode.com/problems/find-median-from-data-stream/ Find Median from Data Stream - 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 heapq는 잊을 만할때쯤 나오고 , O(NlogN)의 time complexity를 가지기 때문에 정렬에 종종 활용되는 것 같습니다. 이번 문제는 addNum의 기능에는 숫자를 추가하고 findMedian기능에서 중간값을 반환하도록 하는 문제인데요 가운데.. 2022. 11. 12.
23 . Merge K sorted List(Linked List 정렬, Merge sort, 분할 정복) https://leetcode.com/problems/merge-k-sorted-lists/ Merge k Sorted Lists - 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 난이도 hard 의 list 형태로 제시된 여러 linked list 를 정렬해서 합치는 문제입니다. 여러 풀이를 가지고 풀이를 짜봤는데요. l 먼저 linked list가 하나인 경우에는 곧 바로 그 linked list가 반환되도록 하고 , 비어있는 경우에는 return으로 직행하.. 2022. 11. 10.
Leetcode 212. WordSearch 2 https://leetcode.com/problems/word-search-ii/ Word Search 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 board라는 매트릭스에서 words에서 찾을 수 있는 단어 리스트를 반환하는 문제입니다. board = [["o","a","a","n"],["e","t","a","e"],["i","h","k","r"],["i","f","l","v"]] words = ["oath","pea","eat","rain"] Ou.. 2022. 11. 5.
728x90
반응형