전체 글 851

[알고리즘] 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

[알고리즘] LeetCode 2322 - Minimum Score After Removals on a Tree (C++)

[문제 링크] : https://leetcode.com/problems/minimum-score-after-removals-on-a-tree/description/ Minimum Score After Removals on a Tree - LeetCodeCan you solve this real interview question? Minimum Score After Removals on a Tree - There is an undirected connected tree with n nodes labeled from 0 to n - 1 and n - 1 edges. You are given a 0-indexed integer array nums of length n where nums[i] represenl..

알고리즘 2026.09.21

[알고리즘] LeetCode 1665 - Minimum Initial Energy to Finish Tasks (C++)

[문제 링크] : https://leetcode.com/problems/minimum-initial-energy-to-finish-tasks/description/ Minimum Initial Energy to Finish Tasks - LeetCodeCan you solve this real interview question? Minimum Initial Energy to Finish Tasks - You are given an array tasks where tasks[i] = [actuali, minimumi]: * actuali is the actual amount of energy you spend to finish the ith task. * minimumi is the minimum amol..

알고리즘 2026.09.20