전체 글 897

[알고리즘] LeetCode 1420 - Build Array Where You Can Find The Maximum Exactly K Comparisons (C++)

[문제 링크] : https://leetcode.com/problems/build-array-where-you-can-find-the-maximum-exactly-k-comparisons/description/ Build Array Where You Can Find The Maximum Exactly K Comparisons - LeetCodeCan you solve this real interview question? Build Array Where You Can Find The Maximum Exactly K Comparisons - You are given three integers n, m and k. Consider the following algorithm to find the maximum ..

알고리즘 2026.11.13

[알고리즘] LeetCode 2179 - Count Good Triplets in an Array (C++)

[문제 링크] : https://leetcode.com/problems/count-good-triplets-in-an-array/description/ Count Good Triplets in an Array - LeetCodeCan you solve this real interview question? Count Good Triplets in an Array - You are given two 0-indexed arrays nums1 and nums2 of length n, both of which are permutations of [0, 1, ..., n - 1]. A good triplet is a set of 3 distinct values which are preseleetcode.com#in..

알고리즘 2026.11.11

[알고리즘] LeetCode 2213 - Longest Substring of One Repeating Character (C++)

[문제 링크] : https://leetcode.com/problems/longest-substring-of-one-repeating-character/description/ Longest Substring of One Repeating Character - LeetCodeCan you solve this real interview question? Longest Substring of One Repeating Character - You are given a 0-indexed string s. You are also given a 0-indexed string queryCharacters of length k and a 0-indexed array of integer indices queryIndice..

알고리즘 2026.11.10

[알고리즘] LeetCode 3414 - Maximum Score of Non-overlapping Intervals (C++)

[문제 링크] : https://leetcode.com/problems/maximum-score-of-non-overlapping-intervals/description/ Maximum Score of Non-overlapping Intervals - LeetCodeCan you solve this real interview question? Maximum Score of Non-overlapping Intervals - You are given a 2D integer array intervals, where intervals[i] = [li, ri, weighti]. Interval i starts at position li and ends at ri, and has a weight of weighti..

알고리즘 2026.11.09

[알고리즘] LeetCode 3600 - Maximize Spanning Tree Stability with Upgrades (C++)

[문제 링크] : https://leetcode.com/problems/maximize-spanning-tree-stability-with-upgrades/description/ Maximize Spanning Tree Stability with Upgrades - LeetCodeCan you solve this real interview question? Maximize Spanning Tree Stability with Upgrades - You are given an integer n, representing n nodes numbered from 0 to n - 1 and a list of edges, where edges[i] = [ui, vi, si, musti]: * ui and vi ind..

알고리즘 2026.11.08

[알고리즘] LeetCode 2642 - Design Graph With Shortest Path Calculator (C++)

[문제 링크] : https://leetcode.com/problems/design-graph-with-shortest-path-calculator/description/ Design Graph With Shortest Path Calculator - LeetCodeCan you solve this real interview question? Design Graph With Shortest Path Calculator - There is a directed weighted graph that consists of n nodes numbered from 0 to n - 1. The edges of the graph are initially represented by the given array edges ..

알고리즘 2026.11.06

[알고리즘] LeetCode 1569 - Number of Ways to Reorder Array to Get Same BST (C++)

[문제 링크] : https://leetcode.com/problems/number-of-ways-to-reorder-array-to-get-same-bst/description/ Number of Ways to Reorder Array to Get Same BST - LeetCodeCan you solve this real interview question? Number of Ways to Reorder Array to Get Same BST - Given an array nums that represents a permutation of integers from 1 to n. We are going to construct a binary search tree (BST) by inserting the ..

알고리즘 2026.11.04