73. Set Matrix Zeroes

Problem Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0’s. You must do it in pla...

medium

200. Number of Islands

Problem Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islan...

medium

3248. Snake in Matrix

Problem There is a snake in an n x n matrix grid and can move in four possible directions. Each cell in the grid is identifie...

easy

70. Climbing Stairs

Problem You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how ...

easy

198. House Robber

Problem You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed...

medium

3244. Shortest Distance After Road Addition Queries II

Problem You are given an integer n and a 2D integer array queries. There are n cities numbered from 0 to n - 1. Initially, th...

hard

322. Coin Change

Problem You are given an integer array coins representing coins of different denominations and an integer amount representing...

medium

191. Number of 1 Bits

Problem Given a positive integer n, write a function that returns the number of set bits in its binary representation (also k...

easy

190. Reverse Bits

Problem Reverse bits of a given 32 bits unsigned integer. Note: Note that in some languages, such as Java, there is no unsig...

easy

3243. Shortest Distance After Road Addition Queries I

Problem You are given an integer n and a 2D integer array queries. There are n cities numbered from 0 to n - 1. Initially, th...

medium

62. Unique Paths

Problem There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]). The robo...

medium

572. Subtree of Another Tree

Problem Given the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structu...

easy

57. Insert Interval

Problem You are given an array of non-overlapping intervals intervals where intervals[i] = [start_i, end_i] represent the sta...

medium

56. Merge Intervals

Problem Given an array of intervals where intervals[i] = [start_i, end_i], merge all overlapping intervals, and return an arr...

medium

55. Jump Game

Problem You are given an integer array nums. You are initially positioned at the array’s first index, and each element in the...

medium

54. Spiral Matrix

Problem Given an m x n matrix, return all elements of the matrix in spiral order. https://leetcode.com/problems/spiral-matrix...

medium

53. Maximum Subarray

Problem Given an integer array nums, find the subarray with the largest sum, and return its sum. A subarray is a contiguous ...

medium

661. Image Smoother

Problem An image smoother is a filter of the size 3 x 3 that can be applied to each cell of an image by rounding down the ave...

easy

435. Non-overlapping Intervals

Problem Given an array of intervals intervals where intervals[i] = [start_i, end_i], return the minimum number of intervals y...

medium

49. Group Anagrams

Problem Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a...

medium

48. Rotate Image

Problem You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotat...

medium

300. Longest Increasing Subsequence

Problem Given an integer array nums, return the length of the longest strictly increasing subsequence. A subsequence is an a...

medium hard

825. Friends Of Appropriate Ages

Problem There are n persons on a social media website. You are given an integer array ages where ages[i] is the age of the i^...

medium

297. Serialize and Deserialize Binary Tree

Problem Serialization is the process of converting a data structure or object into a sequence of bits so that it can be store...

hard

424. Longest Repeating Character Replacement

Problem You are given a string s and an integer k. You can choose any character of the string and change it to any other uppe...

medium

295. Find Median from Data Stream

Problem The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value,...

hard

3240. Minimum Number of Flips to Make Binary Grid Palindromic II

Problem You are given an m x n binary matrix grid. A row or column is considered palindromic if its values read the same forw...

medium

417. Pacific Atlantic Water Flow

Problem There is an m x n rectangular island that borders both the Pacific Ocean and Atlantic Ocean. The Pacific Ocean touche...

medium

33. Search in Rotated Sorted Array

Problem There is an integer array nums sorted in ascending order (with distinct values). Prior to being passed to your functi...

medium

153. Find Minimum in Rotated Sorted Array

Problem Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums ...

medium

3239. Minimum Number of Flips to Make Binary Grid Palindromic I

Problem You are given an m x n binary matrix grid. A row or column is considered palindromic if its values read the same forw...

medium

152. Maximum Product Subarray

Problem Given an integer array nums, find a subarray that has the largest product, and return the product. A subarray is a c...

medium
12