전체 글 841

[알고리즘] LeetCode 1931 - Painting a Grid With Three Different Colors (C++)

[문제 링크] : https://leetcode.com/problems/painting-a-grid-with-three-different-colors/description/ Painting a Grid With Three Different Colors - LeetCodeCan you solve this real interview question? Painting a Grid With Three Different Colors - You are given two integers m and n. Consider an m x n grid where each cell is initially white. You can paint each cell red, green, or blue. All cells must be..

알고리즘 2026.09.18

[알고리즘] LeetCode 1948 - Delete Duplicate Folders in System (C++)

[문제 링크] : https://leetcode.com/problems/delete-duplicate-folders-in-system/submissions/2144805629/ Delete Duplicate Folders in System - LeetCodeCan you solve this real interview question? Delete Duplicate Folders in System - Due to a bug, there are many duplicate folders in a file system. You are given a 2D array paths, where paths[i] is an array representing an absolute path to the ith folder i..

알고리즘 2026.09.17

[알고리즘] LeetCode 1611 - Minimum One Bit Operations to Make Integers Zero (C++)

[문제 링크] : https://leetcode.com/problems/minimum-one-bit-operations-to-make-integers-zero/description/ Minimum One Bit Operations to Make Integers Zero - LeetCodeCan you solve this real interview question? Minimum One Bit Operations to Make Integers Zero - Given an integer n, you must transform it into 0 using the following operations any number of times: * Change the rightmost (0th) bit in the b..

알고리즘 2026.09.16

[알고리즘] LeetCode 1526 - Minimum Number of Increments on Subarrays to Form a Target Array (C++)

[문제 링크] : https://leetcode.com/problems/minimum-number-of-increments-on-subarrays-to-form-a-target-array/description/ Minimum Number of Increments on Subarrays to Form a Target Array - LeetCodeCan you solve this real interview question? Minimum Number of Increments on Subarrays to Form a Target Array - You are given an integer array target. You have an integer array initial of the same size as t..

알고리즘 2026.09.15

[알고리즘] LeetCode 2392 - Build a Matrix With Conditions (C++)

[문제 링크] : https://leetcode.com/problems/build-a-matrix-with-conditions/description/ Build a Matrix With Conditions - LeetCodeCan you solve this real interview question? Build a Matrix With Conditions - You are given a positive integer k. You are also given: * a 2D integer array rowConditions of size n where rowConditions[i] = [abovei, belowi], and * a 2D integer array colConditileetcode.com#incl..

알고리즘 2026.09.13

[알고리즘] LeetCode 1411 - Number of Ways to Paint N × 3 Grid (C++)

[문제 링크] : https://leetcode.com/problems/number-of-ways-to-paint-n-3-grid/description/ Number of Ways to Paint N × 3 Grid - LeetCodeCan you solve this real interview question? Number of Ways to Paint N × 3 Grid - You have a grid of size n x 3 and you want to paint each cell of the grid with exactly one of the three colors: Red, Yellow, or Green while making sure that no two adjacent cleetcode.com..

알고리즘 2026.09.11

[알고리즘] LeetCode 1255 - Maximum Score Words Formed by Letters (C++)

[문제 링크] : https://leetcode.com/problems/maximum-score-words-formed-by-letters/description/ Maximum Score Words Formed by Letters - LeetCodeCan you solve this real interview question? Maximum Score Words Formed by Letters - Given a list of words, list of single letters (might be repeating) and score of every character. Return the maximum score of any valid set of words formed by using theleetcod..

알고리즘 2026.09.10