Eat Study Love

먹고 공부하고 사랑하라

코딩테스트 61

Find if Path Exists in Graph[Depth-First Search,Breadth-First Search,Union Find,Graph]

https://leetcode.com/problems/find-if-path-exists-in-graph/description/?envType=problem-list-v2&envId=graphThere is a bi-directional graph with n vertices, where each vertex is labeled from 0 to n - 1 (inclusive). The edges in the graph are represented as a 2D integer array edges, where each edges[i] = [ui, vi] denotes a bi-directional edge between vertex ui and vertex vi. Every vertex pair is c..

Coding_Practice 2024.10.28

My Calendar II[Array,Binary Search,Design,Segment Tree,Prefix Sum,Ordered Set]

https://leetcode.com/problems/my-calendar-ii/description/You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a triple booking.A triple booking happens when three events have some non-empty intersection (i.e., some moment is common to all the three events.).The event can be represented as a pair of integers start and end that represent..

Coding_Practice 2024.10.24

MinMaxDivision(Divide array A into K blocks and minimize the largest sum of any block)

https://app.codility.com/programmers/lessons/14-binary_search_algorithm/min_max_division/ MinMaxDivision coding task - Learn to Code - CodilityDivide array A into K blocks and minimize the largest sum of any block.app.codility.comYou are given integers K, M and a non-empty array A consisting of N integers. Every element of the array is not greater than M.You should divide this array into K block..

Coding_Practice 2024.10.16

Sort List[Linked List,Two Pointers,Divide and Conquer,Sorting,Merge Sort]

https://leetcode.com/problems/sort-list/description/Given the head of a linked list, return the list after sorting it in ascending order. Example 1:Input: head = [4,2,1,3]Output: [1,2,3,4]Example 2:Input: head = [-1,5,3,4,0]Output: [-1,0,3,4,5]Example 3:Input: head = []Output: [] Constraints:The number of nodes in the list is in the range [0, 5 * 104].-105  Follow up: Can you sort the linked lis..

Coding_Practice 2024.10.10

Minimum Add to Make Parentheses Valid[M,String,Stack,Greedy]

https://leetcode.com/problems/minimum-add-to-make-parentheses-valid/description/?envType=daily-question&envId=2024-10-09A parentheses string is valid if and only if:It is the empty string,It can be written as AB (A concatenated with B), where A and B are valid strings, orIt can be written as (A), where A is a valid string.You are given a parentheses string s. In one move, you can insert a parent..

Coding_Practice 2024.10.09