전체 글 856

[알고리즘] LeetCode 1900 - The Earliest and Latest Rounds Where Players Compete (C++)

[문제 링크] : https://leetcode.com/problems/the-earliest-and-latest-rounds-where-players-compete/description/ The Earliest and Latest Rounds Where Players Compete - LeetCodeCan you solve this real interview question? The Earliest and Latest Rounds Where Players Compete - There is a tournament where n players are participating. The players are standing in a single row and are numbered from 1 to n bas..

알고리즘 2026.10.03

[알고리즘] LeetCode 1320 - Minimum Distance to Type a Word Using Two Fingers (C++)

[문제 링크] : https://leetcode.com/problems/minimum-distance-to-type-a-word-using-two-fingers/description/ Minimum Distance to Type a Word Using Two Fingers - LeetCodeCan you solve this real interview question? Minimum Distance to Type a Word Using Two Fingers - [https://assets.leetcode.com/uploads/2026/06/04/image.png] You have a keyboard layout as shown above in the X-Y plane, where each English u..

알고리즘 2026.10.01

[알고리즘] LeetCode 3373 - Maximize the Number of Target Nodes After Connecting Trees II (C++)

[문제 링크] : https://leetcode.com/problems/maximize-the-number-of-target-nodes-after-connecting-trees-ii/description/ Maximize the Number of Target Nodes After Connecting Trees II - LeetCodeCan you solve this real interview question? Maximize the Number of Target Nodes After Connecting Trees II - There exist two undirected trees with n and m nodes, labeled from [0, n - 1] and [0, m - 1], respective..

알고리즘 2026.09.30

[알고리즘] LeetCode 1284 - Minimum Number of Flips to Convert Binary Matrix to Zero Matrix (C++)

[문제 링크] : https://leetcode.com/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix/description/ Minimum Number of Flips to Convert Binary Matrix to Zero Matrix - LeetCodeCan you solve this real interview question? Minimum Number of Flips to Convert Binary Matrix to Zero Matrix - Given a m x n binary matrix mat. In one step, you can choose one cell and flip it and all the fou..

알고리즘 2026.09.28

[알고리즘] LeetCode 1944 - Number of Visible People in a Queue (C++)

[문제 링크] : https://leetcode.com/problems/number-of-visible-people-in-a-queue/description/ Number of Visible People in a Queue - LeetCodeCan you solve this real interview question? Number of Visible People in a Queue - There are n people standing in a queue, and they numbered from 0 to n - 1 in left to right order. You are given an array heights of distinct integers where heights[i] represeleetcod..

알고리즘 2026.09.27

[알고리즘] LeetCode 2872 - Maximum Number of K-Divisible Components (C++)

[문제 링크] : https://leetcode.com/problems/maximum-number-of-k-divisible-components/description/ Maximum Number of K-Divisible Components - LeetCodeCan you solve this real interview question? Maximum Number of K-Divisible Components - There is an undirected tree with n nodes labeled from 0 to n - 1. You are given the integer n and a 2D integer array edges of length n - 1, where edges[i] = [ai, bi] ..

알고리즘 2026.09.26

[알고리즘] LeetCode 1074 - Number of Submatrices That Sum to Target (C++)

[문제 링크] : https://leetcode.com/problems/number-of-submatrices-that-sum-to-target/description/ Number of Submatrices That Sum to Target - LeetCodeCan you solve this real interview question? Number of Submatrices That Sum to Target - Given a matrix and a target, return the number of non-empty submatrices that sum to target. A submatrix x1, y1, x2, y2 is the set of all cells matrix[x][y] with x1 le..

알고리즘 2026.09.24