전체 글 880

[알고리즘] LeetCode 2088 - Count Fertile Pyramids in a Land (C++)

[문제 링크] : https://leetcode.com/problems/count-fertile-pyramids-in-a-land/description/ Count Fertile Pyramids in a Land - LeetCodeCan you solve this real interview question? Count Fertile Pyramids in a Land - A farmer has a rectangular grid of land with m rows and n columns that can be divided into unit cells. Each cell is either fertile (represented by a 1) or barren (represented byleetcode.com#..

알고리즘 2026.10.27

[알고리즘] LeetCode 1298 - Maximum Candies You Can Get from Boxes (C++)

[문제 링크] : https://leetcode.com/problems/maximum-candies-you-can-get-from-boxes/description/ Maximum Candies You Can Get from Boxes - LeetCodeCan you solve this real interview question? Maximum Candies You Can Get from Boxes - You have n boxes labeled from 0 to n - 1. You are given four arrays: status, candies, keys, and containedBoxes where: * status[i] is 1 if the ith box is open and 0 if thele..

알고리즘 2026.10.24

[알고리즘] LeetCode 1617 - Count Subtrees With Max Distance Between Cities (C++)

[문제 링크] : https://leetcode.com/problems/count-subtrees-with-max-distance-between-cities/description/ Count Subtrees With Max Distance Between Cities - LeetCodeCan you solve this real interview question? Count Subtrees With Max Distance Between Cities - There are n cities numbered from 1 to n. You are given an array edges of size n-1, where edges[i] = [ui, vi] represents a bidirectional edge betw..

알고리즘 2026.10.22

[알고리즘] LeetCode 3108 - Minimum Cost Walk in Weighted Graph (C++)

[문제 링크] : https://leetcode.com/problems/minimum-cost-walk-in-weighted-graph/description/ Minimum Cost Walk in Weighted Graph - LeetCodeCan you solve this real interview question? Minimum Cost Walk in Weighted Graph - There is an undirected weighted graph with n vertices labeled from 0 to n - 1. You are given the integer n and an array edges, where edges[i] = [ui, vi, wi] indicates that thleetcod..

알고리즘 2026.10.20

[알고리즘] LeetCode 3989 - Maximum Consistent Columns in a Grid (C++)

[문제 링크] : https://leetcode.com/problems/maximum-consistent-columns-in-a-grid/description/ Maximum Consistent Columns in a Grid - LeetCodeCan you solve this real interview question? Maximum Consistent Columns in a Grid - You are given a 2D integer array grid of size m x n, and an integer limit. You may remove zero or more columns from the grid, but at least one column must remain. The relatileetc..

알고리즘 2026.10.19

[알고리즘] LeetCode 1970 - Last Day Where You Can Still Cross (C++)

[문제 링크] : https://leetcode.com/problems/last-day-where-you-can-still-cross/description/ Last Day Where You Can Still Cross - LeetCodeCan you solve this real interview question? Last Day Where You Can Still Cross - There is a 1-based binary matrix where 0 represents land and 1 represents water. You are given integers row and col representing the number of rows and columns in the matrix,leetcode.c..

알고리즘 2026.10.18