1790. Check if One String Swap Can Make Strings Equal

Problem You are given two strings s1 and s2 of equal length. A string swap is an operation where you choose two indices in a ...

easy

90. Subsets II

Problem Given an integer array nums that may contain duplicates, return all possible subsets (the power set). A subset of an...

easy

78. Subsets

Problem Given an integer array nums of unique elements, return all possible subsets (the power set). A subset of an array is...

easy

1800. Maximum Ascending Subarray Sum

Problem Given an array of positive integers nums, return the maximum possible sum of an ascending subarray in nums. A subarra...

easy

922. Sort Array By Parity II

Problem Given an array of integers nums, half of the integers in nums are odd, and the other half are even. Sort the array so...

easy

905. Sort Array By Parity

Problem Given an integer array nums, move all the even integers at the beginning of the array followed by all the odd integer...

easy

3105. Longest Strictly Increasing or Strictly Decreasing Subarray

Problem You are given an array of integers nums. Return the length of the longest subarray of nums which is either strictly i...

easy

680. Valid Palindrome II

Problem Given a string s, return true if the s can be palindrome after deleting at most one character from it. https://leetco...

easy

1752. Check if Array Is Sorted and Rotated

Problem Given an array nums, return true if the array was originally sorted in non-decreasing order, then rotated some number...

easy

598. Range Addition II

Problem You are given an m x n matrix M initialized with all 0’s and an array of operations ops, where ops[i] = [aᵢ, bᵢ] mean...

easy

81. Search in Rotated Sorted Array II

Problem There is an integer array nums sorted in non-decreasing order (not necessarily with distinct values). Before being pa...

medium

827. Making A Large Island

Problem You are given an n x n binary matrix grid. You are allowed to change at most one 0 to be 1. Return the size of the la...

hard

541. Reverse String II

Problem Given a string s and an integer k, reverse the first k characters for every 2k characters counting from the start of ...

easy

344. Reverse String

Problem Write a function that reverses a string. The input string is given as an array of characters s. You must do this by m...

easy

350. Intersection of Two Arrays II

Problem Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must appe...

easy

349. Intersection of Two Arrays

Problem Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must be u...

easy

219. Contains Duplicate II

Problem Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such...

easy

118. Pascal’s Triangle

Problem Given an integer numRows, return the first numRows of Pascal’s triangle. In Pascal’s triangle, each number is the sum...

easy

2658. Maximum Number of Fish in a Grid

Problem You are given a 0-indexed 2D matrix grid of size m x n, where (r, c) represents: A land cell if grid[r][c] = 0, or A...

medium

119. Pascal's Triangle II

Problem Given an integer rowIndex, return the rowIndexᵗʰ (0-indexed) row of the Pascal’s triangle. In Pascal’s triangle, each...

easy

1462. Course Schedule IV

Problem There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array pr...

medium

45. Jump Game II

Problem You are given a 0-indexed array of integers nums of length n. You are initially positioned at nums[0]. Each element n...

medium todo

2948. Make Lexicographically Smallest Array by Swapping Elements

Problem You are given a 0-indexed array of positive integers nums and a positive integer limit. In one operation, you can cho...

medium

2412. Minimum Money Required Before Transactions

Problem You are given a 0-indexed 2D integer array transactions, where transactions[i] = [costᵢ, cashbackᵢ]. The array descri...

hard

2920. Maximum Points After Collecting Coins From All Nodes

Problem There exists an undirected tree rooted at node 0 with n nodes labeled from 0 to n - 1. You are given a 2D integer arr...

hard

1267. Count Servers that Communicate

Problem You are given a map of a server center, represented as a m * n integer matrix grid, where 1 means that on that cell t...

medium

1561. Maximum Number of Coins You Can Get

Problem There are 3n piles of coins of varying size, you and your friends will take piles of coins as follows: In each step,...

medium

2017. Grid Game

Problem You are given a 0-indexed 2D array grid of size 2 x n, where grid[r][c] represents the number of points at position (...

medium

2218. Maximum Value of K Coins From Piles

Problem There are n piles of coins on a table. Each pile consists of a positive number of coins of assorted denominations. In...

hard

2661. First Completely Painted Row or Column

Problem You are given a 0-indexed integer array arr, and an m x n integer matrix mat. arr and mat both contain all the intege...

medium

2239. Find Closest Number to Zero

Problem Given an integer array nums of size n, return the number with the value closest to 0 in nums. If there are multiple a...

easy

42. Trapping Rain Water

Problem Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water ...

hard todo
123411