855. Exam Room

Problem There is an exam room with n seats in a single row labeled from 0 to n - 1. When a student enters the room, they must...

medium

684. Redundant Connection

Problem In this problem, a tree is an undirected graph that is connected and has no cycles. You are given a graph that starte...

medium

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...

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...

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...

hard

1387. Sort Integers by The Power Value

Problem The power of an integer x is defined as the number of steps needed to transform x into 1 using the following steps: ...

medium

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] = [...

hard

145. Binary Tree Postorder Traversal

Problem Given the root of a binary tree, return the postorder traversal of its nodes’ values. https://leetcode.com/problems/b...

easy

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 ...

hard

95. Unique Binary Search Trees II

Problem Given an integer n, return all the structurally unique BST’s (binary search trees), which has exactly n nodes of uniq...

medium

2545. Sort the Students by Their Kth Score

Problem There is a class with m students and n exams. You are given a 0-indexed m x n integer matrix score, where each row re...

medium

96. Unique Binary Search Trees

Problem Given an integer n, return the number of structurally unique BST’s (binary search trees) which has exactly n nodes of...

medium

89. Gray Code

Problem An n-bit gray code sequence is a sequence of 2ⁿ integers where: Every integer is in the inclusive range [0, 2ⁿ - 1],...

medium

72. Edit Distance

Problem Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You ha...

medium

50. Pow(x, n)

Problem Implement pow(x, n), which calculates x raised to the power n (i.e., xⁿ). https://leetcode.com/problems/powx-n/ Examp...

medium

770. Basic Calculator IV

Problem Given an expression such as expression = "e + 8 - a + 5" and an evaluation map such as {"e":...

hard

227. Basic Calculator II

Problem Given a string s which represents an expression, evaluate this expression and return its value. The integer division ...

medium

224. Basic Calculator

Problem Given a string s representing a valid expression, implement a basic calculator to evaluate it, and return the result ...

hard

2415. Reverse Odd Levels of Binary Tree

Problem Given the root of a perfect binary tree, reverse the node values at each odd level of the tree. For example, suppose...

medium

3138. Minimum Length of Anagram Concatenation

Problem You are given a string s, which is known to be a concatenation of anagrams of some string t. Return the minimum possi...

medium

337. House Robber III

Problem The thief has found himself a new place for his thievery again. There is only one entrance to this area, called root....

medium

43. Multiply Strings

Problem Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also repre...

medium

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...

hard

769. Max Chunks To Make Sorted

Problem You are given an integer array arr of length n that represents a permutation of the integers in the range [0, n - 1]....

medium

3285. Find Indices of Stable Mountains

Problem There are n mountains in a row, and each mountain has a height. You are given an integer array height where height[i]...

easy

714. Best Time to Buy and Sell Stock with Transaction Fee

Problem You are given an array prices where prices[i] is the price of a given stock on the iᵗʰ day, and an integer fee repres...

medium

309. Best Time to Buy and Sell Stock with Cooldown

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...

medium

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....

hard

739. Daily Temperatures

Problem Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i]...

medium

503. Next Greater Element II

Problem Given a circular integer array nums (i.e., the next element of nums[nums.length - 1] is nums[0]), return the next gre...

medium

496. Next Greater Element I

Problem The next greater element of some element x in an array is the first greater element that is to the right of x in the ...

easy

1475. Final Prices With a Special Discount in a Shop

Problem You are given an integer array prices where prices[i] is the price of the iᵗʰ item in a shop. There is a special disc...

easy
13456710