전체 글

전체 글

    12/5 (화) D3.js로 그래프 자료구조 시각화하기 TIL

    Hello codePen에서 보기: https://codepen.io/soa6318/pen/qBgLaxP 출처: LeetCode #684. Redundant Connection 와 Edge Copilot Uploaded by N2T

    11/14 (화) 대소문자를 모두 가지는 최장 부분 문자열 구하기 TIL

    11/14 (화) 대소문자를 모두 가지는 최장 부분 문자열 구하기 TIL

    공부한 것LeetCode #1763. Longest Nice SubstringLongest Nice Substring - LeetCodeCan you solve this real interview question? Longest Nice Substring - A string s is nice if, for every letter of the alphabet that s contains, it appears both in uppercase and lowercase. For example, "abABB" is nice because 'A' and 'a' appear, and 'B' and 'b' appear. However, "abA" is not because 'b' appears, but 'B' does..

    11/3 (금) 합이 가장 큰 부분 배열 TIL

    공부한 것LeetCode #53. Maximum SubarrayMaximum Subarray - LeetCodeCan you solve this real interview question? Maximum Subarray - Given an integer array nums, find the subarray with the largest sum, and return its sum. Example 1: Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output: 6 Explanation: The subarray [4,-1,2,1] has the largest sum 6. Example 2: Input: nums = [1] Output: 1 Explanation: The subarray ..

    11/2 (목) 쿼리를 포함하기 위한 최소 인터벌 TIL

    공부한 것LeetCode #1851. Minimum Interval to Include Each QueryMinimum Interval to Include Each Query - LeetCodeCan you solve this real interview question? Minimum Interval to Include Each Query - You are given a 2D integer array intervals, where intervals[i] = [lefti, righti] describes the ith interval starting at lefti and ending at righti (inclusive). The size of an interval is defined as the num..

    10/28 (토) (완료)인터벌이 안 겹치도록 삭제해야 하는 최소 인터벌 개수 TIL

    10/28 (토) (완료)인터벌이 안 겹치도록 삭제해야 하는 최소 인터벌 개수 TIL

    공부한 것LeetCode #435. Non-overlapping IntervalsNon-overlapping Intervals - LeetCodeCan you solve this real interview question? Non-overlapping Intervals - Given an array of intervals intervals where intervals[i] = [starti, endi], return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping. Example 1: Input: intervals = [[1,2],[2,3],[3,4],[1,3]] Outpu..

    10/27 (금) 인터벌이 안 겹치도록 삭제해야 하는 최소 인터벌 개수 TIL

    공부한 것LeetCode #435. Non-overlapping IntervalsNon-overlapping Intervals - LeetCodeCan you solve this real interview question? Non-overlapping Intervals - Given an array of intervals intervals where intervals[i] = [starti, endi], return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping. Example 1: Input: intervals = [[1,2],[2,3],[3,4],[1,3]] Outpu..

    10/26 (목) 겹치는 인터벌 합치기 TIL

    공부한 것LeetCode #56. Merge IntervalLeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/merge-intervals/submissions/어제는 이미 정렬된 인터벌들에 새 인터벌을 하나 끼우는 방식으로, 전체를 한 번만 순회하기 때문에 시간 복잡도는 O(n)O(n)O(n)이면 되었다. 오늘은 정렬되지 않은 전체 ..

    10/25 (수) (완료)인터벌 끼워넣기 TIL

    공부한 것LeetCode #57. Insert IntervalInsert Interval - LeetCodeCan you solve this real interview question? Insert Interval - You are given an array of non-overlapping intervals intervals where intervals[i] = [starti, endi] represent the start and the end of the ith interval and intervals is sorted in ascending order by starti. You are also given an interval newInterval = [start, end] that represent..

    10/24 (화) 인터벌 끼워넣기 TIL

    공부한 것LeetCode #57. Insert IntervalInsert Interval - LeetCodeCan you solve this real interview question? Insert Interval - You are given an array of non-overlapping intervals intervals where intervals[i] = [starti, endi] represent the start and the end of the ith interval and intervals is sorted in ascending order by starti. You are also given an interval newInterval = [start, end] that represent..

    10/23 (월) (완료)스트림에서 중위값 찾기 TIL

    공부한 것LeetCode #295. Find Median from Data StreamFind Median from Data Stream - LeetCodeCan you solve this real interview question? Find Median from Data Stream - The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value, and the median is the mean of the two middle values. * For example, for arr = [2,3,4], the median is 3. * For example,..

    10/21 (토) (진행중)스트림에서 중위값 찾기 TIL

    공부한 것LeetCode #295. Find Median from Data StreamFind Median from Data Stream - LeetCodeCan you solve this real interview question? Find Median from Data Stream - The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value, and the median is the mean of the two middle values. * For example, for arr = [2,3,4], the median is 3. * For example,..

    10/20 (금) 트위터 클래스 디자인하기 TIL

    공부한 것LeetCode #355. Design TwitterDesign Twitter - LeetCodeCan you solve this real interview question? Design Twitter - Design a simplified version of Twitter where users can post tweets, follow/unfollow another user, and is able to see the 10 most recent tweets in the user's news feed. Implement the Twitter class: * Twitter() Initializes your twitter object. * void postTweet(int userId, int twe..

    10/19 (목) 원점에 가장 가까운 K개의 점 TIL

    공부한 것LeetCode #973. K Closest Points to OriginLeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/k-closest-points-to-origin/description/⇒ 좌표 평면에 흩어져 있는 점들의 위치[x,y]가 주어졌을 때 원점에 가장 가까운 k개의 점들을 따로 모아 반환하는 문제였다. Map..

    10/18 (수) 마지막 남은 돌멩이의 무게(최대 힙 구현) TIL

    공부한 것LeetCode #1046. Last Stone WeightLast Stone Weight - LeetCodeCan you solve this real interview question? Last Stone Weight - You are given an array of integers stones where stones[i] is the weight of the ith stone. We are playing a game with the stones. On each turn, we choose the heaviest two stones and smash them together. Suppose the heaviest two stones have weights x and y with x

    10/17 (화) 배열에서 K번째로 큰 수 찾기(최소 힙 구현) TIL

    공부한 것LeetCode #215. Kth Largest Element in an ArrayKth Largest Element in an Array - LeetCodeCan you solve this real interview question? Kth Largest Element in an Array - Given an integer array nums and an integer k, return the kth largest element in the array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Can you solve it without sorting? Example 1: ..

    10/16 (월) 스트림에서 K번째로 큰 수 찾기(최소 힙 구현) + 우선순위 큐 개괄 TIL

    공부한 것LeetCode #703. Kth Largest Element in a StreamLeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/kth-largest-element-in-a-stream/description/자바스크립트의 sort()을 이용한 풀이와 최소 힙(Min Heap)을 구현해서 푼 풀이의 결과 차이가 엄청나다: 번..

    10/13 (금) 백트래킹 TIL

    10/13 (금) 백트래킹 TIL

    공부한 것LeetCode #78. SubsetsSubsets - LeetCodeCan you solve this real interview question? Subsets - Given an integer array nums of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. Example 1: Input: nums = [1,2,3] Output: [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]] Example 2: Input: nums = [0] Output:..

    10/12 (목) Puppeteer에 발생한 CORS 문제 우회 성공 TIL, TIT

    공부한 것LeetCode #106. Construct Binary Tree from Inorder and Postorder TraversalLeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/description/ChatGPT에게 내..

    10/11 (수) 브라우저에 막대 그룹 그래프를 그리다 TIL

    공부한 것LeetCode #106. Construct Binary Tree from Inorder and Postorder TraversalLeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/description/진행중이다. 다음 규..

    10/10 (화) 콘솔에 선 그래프를 그리다 TIL

    10/10 (화) 콘솔에 선 그래프를 그리다 TIL

    공부한 것LeetCode #671. Second Minimum Node In a Binary TreeLeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/second-minimum-node-in-a-binary-tree/description/Easy 난이도 문제인데 은근히 오래 걸렸다. 재귀 해법으로 스스로 풀어냈다는 점이 고무적이다. 진..