3151. Special Array I

Problem An array is considered special if every pair of its adjacent elements contains two numbers with different parity. You...

easy

1812. Determine Color of a Chessboard Square

Problem You are given coordinates, a string that represents the coordinates of a square of the chessboard. Below is a chessbo...

easy

999. Available Captures for Rook

Problem You are given an 8 x 8 matrix representing a chessboard. There is exactly one white rook represented by 'R', some num...

easy

3274. Check if Two Chessboard Squares Have the Same Color

Problem You are given two strings, coordinate1 and coordinate2, representing the coordinates of a square on an 8 x 8 chessboa...

easy

1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence

Problem Given a sentence that consists of some words separated by a single space, and a searchWord, check if searchWord is a ...

easy

1346. Check If N and Its Double Exist

Problem Given an array arr of integers, check if there exist two indices i and j such that : i != j 0 <= i, j < arr.le...

easy

3232. Find if Digit Game Can Be Won

Problem You are given an array of positive integers nums. Alice and Bob are playing a game. In the game, Alice can choose eit...

easy

796. Rotate String

Problem Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s. A shift ...

easy

2490. Circular Sentence

Problem A sentence is a list of words that are separated by a single space with no leading or trailing spaces. For example, ...

easy

1957. Delete Characters to Make Fancy String

Problem A fancy string is a string where no three consecutive characters are equal. Given a string s, delete the minimum poss...

easy

3222. Find the Winning Player in Coin Game

Problem You are given two positive integers x and y, denoting the number of coins with values 75 and 10 respectively. Alice a...

easy

3226. Number of Bit Changes to Make Two Integers Equal

Problem You are given two positive integers n and k. You can choose any bit in the binary representation of n that is equal t...

easy

2923. Find Champion I

Problem There are n teams numbered from 0 to n - 1 in a tournament. Given a 0-indexed 2D boolean matrix grid of size n * n. F...

easy

125. Valid Palindrome

Problem A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alpha...

easy

3206. Alternating Groups I

Problem There is a circle of red and blue tiles. You are given an array of integers colors. The color of tile i is represente...

easy

121. Best Time to Buy and Sell Stock

Problem You are given an array prices where prices[i] is the price of a given stock on the iᵗʰ day. You want to maximize your...

easy

242. Valid Anagram

Problem Given two strings s and t, return true if t is an anagram of s, and false otherwise. An anagram is a word or phrase ...

easy

104. Maximum Depth of Binary Tree

Problem Given the root of a binary tree, return its maximum depth. A binary tree’s maximum depth is the number of nodes along...

easy

100. Same Tree

Problem Given the roots of two binary trees p and q, write a function to check if they are the same or not. Two binary trees ...

easy

226. Invert Binary Tree

Problem Given the root of a binary tree, invert the tree, and return its root. https://leetcode.com/problems/invert-binary-tr...

easy

217. Contains Duplicate

Problem Given an integer array nums, return true if any value appears at least twice in the array, and return false if every ...

easy

3238. Find the Number of Winning Players

Problem You are given an integer n representing the number of players in a game and a 2D array pick where pick[i] = [xᵢ, yᵢ] ...

easy

338. Counting Bits

Problem Given an integer n, return an array ans of length n + 1 such that for each i (0 <= i <= n), ans[i] is the numbe...

easy

206. Reverse Linked List

Problem Given the head of a singly linked list, reverse the list, and return the reversed list. https://leetcode.com/problems...

easy

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

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

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

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

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
12