2360. Longest Cycle in a Graph Problem You are given a directed graph of n nodes numbered from 0 to n - 1, where each node has at most one outgoing edge. Th... 2024-12-24 hard
2608. Shortest Cycle in a Graph Problem There is a bi-directional graph with n vertices, where each vertex is labeled from 0 to n - 1. The edges in the graph... 2024-12-24 hard
3203. Find Minimum Diameter After Merging Two Trees Problem There exist two undirected trees with n and m nodes, numbered from 0 to n - 1 and from 0 to m - 1, respectively. You ... 2024-12-24 hard
2127. Maximum Employees to Be Invited to a Meeting Problem A company is organizing a meeting and has a list of n employees, waiting to be invited. They have arranged for a larg... 2024-12-24 hard
685. Redundant Connection II Problem In this problem, a rooted tree is a directed graph such that, there is exactly one node (the root) for which all othe... 2024-12-23 hard
1591. Strange Printer II Problem There is a strange printer with the following two special requirements: On each turn, the printer will print a solid... 2024-12-22 hard
2940. Find Building Where Alice and Bob Can Meet Problem You are given a 0-indexed array heights of positive integers, where heights[i] represents the height of the iᵗʰ build... 2024-12-25 hard
664. Strange Printer Problem There is a strange printer with the following two special properties: The printer can only print a sequence of the s... 2024-12-22 hard
1610. Maximum Number of Visible Points Problem You are given an array points, an integer angle, and your location, where location = [pos_x, pos_y] and points[i] = [... 2024-12-21 hard
2872. Maximum Number of K-Divisible Components Problem 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 ... 2024-12-21 hard
770. Basic Calculator IV Problem Given an expression such as expression = "e + 8 - a + 5" and an evaluation map such as {"e": 1} (given in terms of ev... 2024-12-20 hard
224. Basic Calculator Problem Given a string s representing a valid expression, implement a basic calculator to evaluate it, and return the result ... 2024-12-20 hard
3389. Minimum Operations to Make Character Frequencies Equal Problem You are given a string s. A string t is called good if all characters of t occur the same number of times. You can pe... 2024-12-19 hard
188. Best Time to Buy and Sell Stock IV Problem You are given an integer array prices where prices[i] is the price of a given stock on the iᵗʰ day, and an integer k.... 2024-12-18 hard
3213. Construct String with Minimum Cost Problem You are given a string target, an array of strings words, and an integer array costs, both arrays of the same length.... 2024-12-17 hard difficult
3292. Minimum Number of Valid Strings to Form Target II 3291. Minimum Number of Valid Strings to Form Target I 的进阶版,题目一模一样,但 words 的长度从 5 * 10³ 增加到 5 * 10⁵,target 的长度从 5 * 10³ 增加到 5... 2024-12-18 hard
3291. Minimum Number of Valid Strings to Form Target I Problem You are given an array of strings words and a string target. A string x is called valid if x is a prefix of any strin... 2024-12-18 medium hard
1847. Closest Room Problem There is a hotel with n rooms. The rooms are represented by a 2D integer array rooms where rooms[i] = [roomIdᵢ, sizeᵢ... 2024-12-26 hard
123. Best Time to Buy and Sell Stock III Problem You are given an array prices where prices[i] is the price of a given stock on the iᵗʰ day. Find the maximum profit y... 2024-12-18 hard
2809. Minimum Time to Make Array Sum At Most x Problem You are given two 0-indexed integer arrays nums1 and nums2 of equal length. Every second, for all indices 0 <= i &... 2024-12-14 hard difficult
3266. Final Array State After K Multiplication Operations II Problem You are given an integer array nums, an integer k, and an integer multiplier. You need to perform k operations on num... 2024-12-14 hard
2931. Maximum Spending After Buying Items Problem You are given a 0-indexed m * n integer matrix values, representing the values of m * n different items in m differen... 2024-12-12 hard
2699. Modify Graph Edge Weights Problem You are given an undirected weighted connected graph containing n nodes labeled from 0 to n - 1, and an integer array... 2024-12-11 hard difficult
1719. Number Of Ways To Reconstruct A Tree Problem You are given an array pairs, where pairs[i] = [xᵢ, yᵢ], and: There are no duplicates. xᵢ < yᵢ Let ways be the n... 2024-12-10 hard difficult todo
1982. Find Array Given Subset Sums Problem You are given an integer n representing the length of an unknown array that you are trying to recover. You are also g... 2024-12-09 hard difficult
782. Transform to Chessboard Problem You are given an n x n binary grid board. In each move, you can swap any two rows with each other, or any two columns... 2024-12-08 hard
2056. Number of Valid Move Combinations On Chessboard Problem There is an 8 x 8 chessboard containing n pieces (rooks, queens, or bishops). You are given a string array pieces of ... 2024-12-04 hard
52. N-Queens II Problem The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each oth... 2024-12-02 hard
1531. String Compression II Problem Run-length encoding is a string compression method that works by replacing consecutive identical characters (rep... 2024-12-01 hard difficult
51. N-Queens Problem The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each oth... 2024-12-02 hard
2097. Valid Arrangement of Pairs Problem You are given a 0-indexed 2D integer array pairs where pairs[i] = [startᵢ, endᵢ]. An arrangement of pairs is valid if... 2024-11-30 hard todo
2577. Minimum Time to Visit a Cell In a Grid Problem You are given a m x n matrix grid consisting of non-negative integers where grid[row][col] represents the minimum tim... 2024-11-29 hard