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ᵢ, endᵢ], return the minimum number of intervals you...

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

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

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

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

23. Merge k Sorted Lists

Problem You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-l...

hard

21. Merge Two Sorted Lists

Problem You are given the heads of two sorted linked lists list1 and list2. Merge the two lists into one sorted list. The lis...

easy

20. Valid Parentheses

Problem Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input str...

easy

19. Remove Nth Node From End of List

Problem Given the head of a linked list, remove the nᵗʰ node from the end of the list and return its head. https://leetcode.c...

medium

143. Reorder List

Problem You are given the head of a singly linked-list. The list can be represented as: L0 → L1 → … → Ln - 1 → Ln Reorder t...

medium

3249. Count the Number of Good Nodes

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

medium

3261. Count Substrings That Satisfy K-Constraint II

Problem You are given a binary string s and an integer k. You are also given a 2D integer array queries, where queries[i] = [...

hard

15. 3Sum

Problem Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k...

medium

268. Missing Number

Problem Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is mi...

easy

141. Linked List Cycle

Problem Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked l...

easy

3258. Count Substrings That Satisfy K-Constraint I

Problem You are given a binary string s and an integer k. A binary string satisfies the k-constraint if either of the followi...

easy

139. Word Break

Problem Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated seque...

medium

1547. Minimum Cost to Cut a Stick

Problem Given a wooden stick of length n units. The stick is labelled from 0 to n. For example, a stick of length 6 is labell...

hard

11. Container With Most Water

Problem You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of th...

medium

647. Palindromic Substrings

Problem Given a string s, return the number of palindromic substrings in it. A string is a palindrome when it reads the same ...

medium
14567