Easy Problems

706 problems

This track helps you build stable solving and explanation quality at this pressure level.

Training Focus

Stabilize fundamentals and explanation rhythm.

Cadence

Run 3-5 problems per round: explain, implement, then review failure paths.

Pair With

Pair this track with topic and pattern pages for faster transfer learning.

1

Two Sum

Two Sum is solved fastest by storing seen values in a hash map and checking each number's needed complement once.

Easy
9

Palindrome Number

Determine if a given integer reads the same forward and backward using a math-driven solution strategy without convertin…

Easy
13

Roman to Integer

Convert a Roman numeral string into an integer using a hash table and mathematical principles to determine value order.

Easy
14

Longest Common Prefix

Find the longest common prefix in an array of strings, returning an empty string if none exists.

Easy
20

Valid Parentheses

Determine if a string of parentheses, brackets, and braces is correctly nested using a stack for proper order validation…

Easy
21

Merge Two Sorted Lists

Merge two sorted linked lists by splicing nodes into one sorted list using linked-list pointer manipulation and recursio…

Easy
26

Remove Duplicates from Sorted Array

Learn how to remove duplicates from a sorted array in-place using two-pointer scanning while preserving element order.

Easy
27

Remove Element

Remove Element challenges you to remove a value from an array in-place using efficient two-pointer scanning and tracking…

Easy
28

Find the Index of the First Occurrence in a String

Locate the first occurrence of a substring within a string using a two-pointer scanning strategy and invariant tracking …

Easy
35

Search Insert Position

Find the correct index for a target value in a sorted array using binary search, or return the position where it should …

Easy
58

Length of Last Word

Determine the length of the last word in a string using a focused string-driven approach to handle spaces and trailing c…

Easy
66

Plus One

Given a number as an array of digits, increment it by one and return the updated array of digits.

Easy
67

Add Binary

Add Binary involves summing two binary strings and returning the result as a binary string using math and string manipul…

Easy
69

Sqrt(x)

Solve the Sqrt(x) problem using binary search to find the integer square root of a number without built-in operators.

Easy
70

Climbing Stairs

Climbing Stairs is a classic dynamic programming problem where you calculate distinct ways to reach the top using step t…

Easy
83

Remove Duplicates from Sorted List

Efficiently remove duplicates from a sorted linked list using precise pointer manipulation while maintaining node order …

Easy
88

Merge Sorted Array

Merge two sorted arrays into the first array in non-decreasing order, using a two-pointer approach.

Easy
94

Binary Tree Inorder Traversal

Binary Tree Inorder Traversal asks you to visit left subtree, node, then right subtree without losing position while mov…

Easy
100

Same Tree

Check whether two binary trees are identical by comparing structure and node values using DFS or BFS traversal strategie…

Easy
101

Symmetric Tree

Determine if a binary tree is symmetric by comparing left and right subtrees using DFS or BFS traversal techniques effic…

Easy
104

Maximum Depth of Binary Tree

Find the maximum depth of a binary tree using traversal techniques to track the longest path from root to leaf.

Easy
108

Convert Sorted Array to Binary Search Tree

Pick the middle element as root at each step so the sorted array becomes a height-balanced BST with valid ordering.

Easy
110

Balanced Binary Tree

Determine if a binary tree is height-balanced using tree traversal and state tracking techniques.

Easy
111

Minimum Depth of Binary Tree

Find the minimum depth of a binary tree, which is the shortest path from the root node to the nearest leaf node.

Easy
112

Path Sum

Determine if a binary tree has a root-to-leaf path where the sum of node values equals a given target sum, using DFS or …

Easy
118

Pascal's Triangle

Generate the first numRows of Pascal's Triangle using dynamic programming with clear state transitions and array manipul…

Easy
119

Pascal's Triangle II

Compute the specific row of Pascal's Triangle using efficient state transition dynamic programming with array-based upda…

Easy
121

Best Time to Buy and Sell Stock

Maximize stock profit by identifying the optimal buy and sell days using dynamic programming.

Easy
125

Valid Palindrome

Check if a given string is a valid palindrome by using two-pointer scanning and invariant tracking techniques.

Easy
136

Single Number

Solve the Single Number problem using an efficient approach with constant space and linear time complexity.

Easy
141

Linked List Cycle

Determine if a given linked list contains a cycle using pointer manipulation or hashing, focusing on detecting repeated …

Easy
144

Binary Tree Preorder Traversal

Perform a binary tree preorder traversal by visiting root nodes first, then left and right subtrees, tracking state iter…

Easy
145

Binary Tree Postorder Traversal

Solve Binary Tree Postorder Traversal using state tracking and binary-tree traversal techniques, focusing on Stack, Tree…

Easy
160

Intersection of Two Linked Lists

Given two linked lists, find the node where they intersect or return null if they do not.

Easy
168

Excel Sheet Column Title

Convert a positive integer to its corresponding Excel column title using base-26 math and string manipulation efficientl…

Easy
169

Majority Element

Find the majority element in an array, where the element appears more than n/2 times, using efficient algorithms.

Easy
171

Excel Sheet Column Number

This problem requires converting an Excel column title into its corresponding column number by applying a math and strin…

Easy
190

Reverse Bits

Reverse a 32-bit unsigned integer by manipulating bits efficiently using a divide and conquer approach with careful bit …

Easy
191

Number of 1 Bits

Number of 1 Bits is a classic bit manipulation problem where clearing the lowest set bit gives the cleanest count.

Easy
202

Happy Number

Determine if a number is happy by repeatedly summing squares of digits using two-pointer scanning to detect cycles effic…

Easy
203

Remove Linked List Elements

Remove all nodes from a linked list that have a specific value, adjusting pointers to preserve the rest of the list.

Easy
205

Isomorphic Strings

Determine if two strings are isomorphic by checking if one string can be transformed into the other using character repl…

Easy
206

Reverse Linked List

Reverse a singly linked list in place, converting the head to tail, with an iterative or recursive approach.

Easy
217

Contains Duplicate

Determine if an integer array contains any duplicate values by efficiently scanning with a hash lookup to ensure fast de…

Easy
219

Contains Duplicate II

Check if any two equal numbers exist within k indices using array scanning and hash table lookup efficiently.

Easy
222

Count Complete Tree Nodes

Count Complete Tree Nodes efficiently by leveraging binary-tree traversal, exploiting completeness, and applying bit man…

Easy
225

Implement Stack using Queues

This problem tests your ability to simulate a LIFO stack using two queues while preserving all standard stack operations…

Easy
226

Invert Binary Tree

Invert Binary Tree swaps every node's left and right children using tree traversal, with recursive DFS or iterative BFS …

Easy
228

Summary Ranges

Summary Ranges involves converting a sorted array of unique integers into a minimal list of range strings.

Easy
231

Power of Two

Determine if a given integer is a power of two using efficient math and bit manipulation techniques with optional recurs…

Easy
232

Implement Queue using Stacks

Implement a queue using two stacks, focusing on stack-based state management to achieve FIFO behavior in a queue.

Easy
234

Palindrome Linked List

Solve Palindrome Linked List by finding the midpoint, reversing the second half, and comparing mirrored nodes in linear …

Easy
242

Valid Anagram

Check if two strings are anagrams using hashing or sorting techniques.

Easy
257

Binary Tree Paths

Find all root-to-leaf paths in a binary tree using DFS and backtracking, constructing strings for each complete path eff…

Easy
258

Add Digits

Add Digits involves repeatedly summing digits of a number until a single digit is obtained.

Easy
263

Ugly Number

The Ugly Number problem asks you to determine if a number is divisible only by 2, 3, or 5.

Easy
268

Missing Number

Find the missing number in an array containing distinct numbers in the range [0, n].

Easy
278

First Bad Version

Find the first bad version of a product using binary search, minimizing the number of API calls.

Easy
283

Move Zeroes

Move all zeros in an array to the end while preserving the order of non-zero elements using efficient in-place operation…

Easy
290

Word Pattern

Solve Word Pattern by checking a one-to-one mapping between pattern letters and words using hash tables after splitting …

Easy
292

Nim Game

In Nim Game, determine if you can win given a certain number of stones, assuming optimal play from both players.

Easy
303

Range Sum Query - Immutable

The Range Sum Query - Immutable problem involves implementing a data structure to handle range sum queries efficiently.

Easy
326

Power of Three

Determine if a given integer is a power of three using math and recursion techniques.

Easy
338

Counting Bits

Compute the number of 1 bits for every integer from 0 to n using state transition dynamic programming for efficiency.

Easy
342

Power of Four

Determine if a given integer is a power of four using math insights and bit manipulation tricks efficiently in code.

Easy
344

Reverse String

Reverse a character array in-place using a two-pointer scanning technique, ensuring minimal memory and correct index swa…

Easy
345

Reverse Vowels of a String

Reverse Vowels of a String uses a two-pointer approach to reverse the vowels in a string while leaving the consonants in…

Easy
349

Intersection of Two Arrays

Find the intersection of two arrays while ensuring unique elements using efficient array scanning and hash lookups.

Easy
350

Intersection of Two Arrays II

Find the intersection of two arrays, accounting for multiple occurrences of the same number.

Easy
367

Valid Perfect Square

Determine if a given positive integer is a perfect square using a binary search approach over potential square roots eff…

Easy
374

Guess Number Higher or Lower

Find the picked number efficiently using binary search while adjusting guesses based on higher or lower feedback in this…

Easy
383

Ransom Note

Determine if a ransom note can be constructed from a magazine's letters using hash tables and string counting techniques…

Easy
387

First Unique Character in a String

Find the index of the first non-repeating character in a string using efficient queue-driven state processing.

Easy
389

Find the Difference

Find the Difference involves identifying the additional letter in one string compared to another, emphasizing hash table…

Easy
392

Is Subsequence

Determine if one string is a subsequence of another using state transition dynamic programming for accurate character ma…

Easy
401

Binary Watch

Binary Watch involves generating possible times on a binary watch given a number of turned-on LEDs.

Easy
404

Sum of Left Leaves

Compute the total of all left leaves in a binary tree using precise traversal and state tracking techniques for correctn…

Easy
405

Convert a Number to Hexadecimal

Convert a 32-bit integer to its hexadecimal string using math operations and careful string manipulation techniques.

Easy
409

Longest Palindrome

Determine the length of the longest palindrome constructible from a given string using greedy counting and frequency tra…

Easy
412

Fizz Buzz

Generate a list from 1 to n replacing multiples of 3 with Fizz, 5 with Buzz, and both with FizzBuzz efficiently.

Easy
414

Third Maximum Number

Find the third distinct maximum number in an array using array traversal and sorting techniques, handling duplicates car…

Easy
415

Add Strings

Given two non-negative integers as strings, sum them and return the result as a string without converting to integers di…

Easy
434

Number of Segments in a String

Count the segments of non-space characters in a string by applying a string-driven approach to solve the problem.

Easy
441

Arranging Coins

Determine the maximum number of complete staircase rows possible with n coins using a binary search approach.

Easy
448

Find All Numbers Disappeared in an Array

Identify all missing numbers in an array using efficient scanning and hash-based lookup for optimal performance.

Easy
455

Assign Cookies

Maximize content children by assigning at most one cookie per child using two-pointer scanning and greedy sorting techni…

Easy
459

Repeated Substring Pattern

Check if a string can be constructed by repeating a substring using string matching techniques.

Easy
461

Hamming Distance

Calculate the Hamming distance between two integers by counting differing bit positions.

Easy
463

Island Perimeter

Determine the perimeter of an island in a grid of land and water cells using DFS or BFS.

Easy
476

Number Complement

The Number Complement problem requires flipping bits in a number’s binary representation to return its complement.

Easy
482

License Key Formatting

Reformat a license key string by splitting into groups of size k, converting to uppercase, and handling dashes appropria…

Easy
485

Max Consecutive Ones

Find the maximum sequence of consecutive 1s in a binary array using an efficient array-driven scanning approach.

Easy
492

Construct the Rectangle

Given an area, design a rectangle with integer length and width optimizing L >= W and minimal difference, using math.

Easy
495

Teemo Attacking

Compute the total poisoned time Ashe experiences from Teemo's attacks using an array-based simulation approach efficient…

Easy
496

Next Greater Element I

Find the next greater element for each number in nums1 from the nums2 array using an optimized approach.

Easy
500

Keyboard Row

Identify all words from a list that can be typed using letters from only one row of a standard American keyboard.

Easy
501

Find Mode in Binary Search Tree

Find Mode in Binary Search Tree asks to identify the most frequent element(s) in a BST using binary-tree traversal.

Easy
504

Base 7

Convert any given integer to its base 7 string representation using efficient math and string manipulation techniques.

Easy
506

Relative Ranks

Solve Relative Ranks by sorting scores with original indices, then writing medal labels or numeric places back in answer…

Easy
507

Perfect Number

Check if a given number is a perfect number by verifying if it's equal to the sum of its divisors, excluding itself.

Easy
509

Fibonacci Number

Calculate the nth Fibonacci number using state transition dynamic programming and recursive techniques efficiently in in…

Easy
520

Detect Capital

Detect Capital asks you to determine if a word follows a correct capital usage pattern based on specific rules.

Easy
521

Longest Uncommon Subsequence I

Determine the length of the longest uncommon subsequence between two strings using a direct string comparison strategy.

Easy
530

Minimum Absolute Difference in BST

Find the minimum absolute difference between values of any two nodes in a BST using tree traversal and careful state tra…

Easy
541

Reverse String II

Reverse String II requires reversing segments of a string using two-pointer scanning while tracking invariants carefully…

Easy
543

Diameter of Binary Tree

The Diameter of Binary Tree problem involves finding the longest path between any two nodes using tree traversal techniq…

Easy
551

Student Attendance Record I

Determine if a student's attendance record qualifies for an award based on specific criteria for absences and lateness.

Easy
557

Reverse Words in a String III

Reverse Words in a String III involves reversing each word in a sentence using the two-pointer technique.

Easy
559

Maximum Depth of N-ary Tree

Find the maximum depth of an N-ary tree, leveraging tree traversal techniques and state tracking.

Easy
561

Array Partition

Maximize the sum of minimums of n pairs in a 2n integer array using a greedy pairing strategy efficiently.

Easy
563

Binary Tree Tilt

Calculate the sum of the binary tree's node tilts using tree traversal and state tracking.

Easy
566

Reshape the Matrix

Reshape the Matrix involves transforming a 2D matrix into a new matrix with the same elements in row-major order, follow…

Easy
572

Subtree of Another Tree

Determine if one binary tree is an exact subtree of another by comparing structure and node values recursively.

Easy
575

Distribute Candies

Maximize the number of different candies Alice can eat given a set of candies and constraints on quantity.

Easy
589

N-ary Tree Preorder Traversal

Solve the N-ary Tree Preorder Traversal problem using depth-first search and stack-based traversal methods.

Easy
590

N-ary Tree Postorder Traversal

Postorder traversal of an N-ary tree can be efficiently solved using DFS and stack-based methods, tracking state across …

Easy
594

Longest Harmonious Subsequence

Find the length of the longest harmonious subsequence in an integer array using array scanning and hash-based frequency …

Easy
598

Range Addition II

Range Addition II requires counting maximum values in a matrix after incremental operations using array and math reasoni…

Easy
599

Minimum Index Sum of Two Lists

Find the common strings between two lists with the smallest index sum in this easy problem involving array scanning and …

Easy
605

Can Place Flowers

Determine if n new flowers can be planted in a flowerbed, ensuring no adjacent flowers using a greedy approach.

Easy
617

Merge Two Binary Trees

Merge Two Binary Trees requires combining nodes by summing overlapping values while preserving non-null nodes from eithe…

Easy
628

Maximum Product of Three Numbers

Find three numbers in an array whose product is the largest using sorting and careful handling of negative values.

Easy
637

Average of Levels in Binary Tree

Calculate the average value of nodes on each level of a binary tree using traversal and state tracking.

Easy
643

Maximum Average Subarray I

Find the maximum average of any contiguous subarray of length k in a given integer array using a sliding window approach…

Easy
645

Set Mismatch

Identify the duplicated and missing numbers in an integer array using array scanning combined with hash table lookup eff…

Easy
653

Two Sum IV - Input is a BST

Determine if a binary search tree contains two nodes whose values sum to a target using efficient traversal and state tr…

Easy
657

Robot Return to Origin

Judge whether a robot returns to the origin after a sequence of moves using string manipulation and simulation.

Easy
661

Image Smoother

Apply a 3x3 smoothing filter to a matrix, rounding down each cell average including surrounding neighbors for accurate r…

Easy
671

Second Minimum Node In a Binary Tree

Find the second minimum node in a binary tree by traversing the tree and tracking state.

Easy
674

Longest Continuous Increasing Subsequence

Find the length of the longest continuous increasing subsequence in an unsorted integer array using an array-driven solu…

Easy
680

Valid Palindrome II

Check if a string can become a palindrome by deleting at most one character using two-pointer scanning and invariant tra…

Easy
682

Baseball Game

Simulate baseball score operations using a stack-based approach to compute the final score after all operations.

Easy
693

Binary Number with Alternating Bits

Check whether a given integer has alternating bits using a bit manipulation approach.

Easy
696

Count Binary Substrings

Count Binary Substrings solves for the number of valid substrings with equal 0's and 1's, grouped consecutively in a bin…

Easy
697

Degree of an Array

Find the shortest subarray with the same degree as the given array using efficient array scanning and hash lookups.

Easy
700

Search in a Binary Search Tree

Locate a target value in a binary search tree and return the subtree rooted at that node using efficient tree traversal …

Easy
703

Kth Largest Element in a Stream

Find the kth largest element in a dynamic stream using binary-tree traversal and efficient state tracking with a min-hea…

Easy
704

Binary Search

Solve the Binary Search problem by finding the index of a target value in a sorted array with O(log n) complexity.

Easy
705

Design HashSet

Implement a custom HashSet without built-in libraries using array scanning and hash lookup for efficient membership chec…

Easy
706

Design HashMap

Implement a custom HashMap from scratch using array scanning and hash lookup without built-in libraries for efficient ke…

Easy
709

To Lower Case

The "To Lower Case" problem asks you to convert all uppercase letters in a string to lowercase.

Easy
717

1-bit and 2-bit Characters

Determine whether the last character in a binary array represents a one-bit character or a two-bit character.

Easy
724

Find Pivot Index

Find the pivot index in an array where the sums of elements on both sides are equal using array and prefix sum technique…

Easy
728

Self Dividing Numbers

Identify self-dividing numbers in a given range by verifying divisibility against their digits.

Easy
733

Flood Fill

Flood Fill is an array and DFS problem where you change connected pixels to a target color efficiently using recursion o…

Easy
744

Find Smallest Letter Greater Than Target

Locate the smallest character in a sorted array that is strictly greater than a given target using efficient binary sear…

Easy
746

Min Cost Climbing Stairs

Compute the minimum cost to reach the top of a staircase using dynamic programming and step-by-step state transitions ef…

Easy
747

Largest Number At Least Twice of Others

Determine if the largest number in the array is at least twice as large as every other element, and return its index or …

Easy
748

Shortest Completing Word

Find the shortest word that completes the license plate by matching all required letters, considering frequency and case…

Easy
762

Prime Number of Set Bits in Binary Representation

Count numbers with prime set bits in a binary representation within a given range.

Easy
766

Toeplitz Matrix

Determine if a given matrix is a Toeplitz matrix by checking diagonal consistency.

Easy
771

Jewels and Stones

Given two strings, determine how many of the stones you have are also jewels, considering case sensitivity.

Easy
783

Minimum Distance Between BST Nodes

Find the minimum difference between values of two different nodes in a Binary Search Tree using tree traversal and state…

Easy
796

Rotate String

Determine if one string can be rotated into another by repeatedly shifting characters, leveraging string matching techni…

Easy
804

Unique Morse Code Words

Determine how many unique Morse code transformations can be generated from a list of words using a hash table and array …

Easy
806

Number of Lines To Write String

Calculate how many lines are needed to write a string given individual letter widths, constrained to 100 pixels per line…

Easy
812

Largest Triangle Area

Find the area of the largest triangle formed by three distinct points on a 2D plane.

Easy
819

Most Common Word

Find the most frequent non-banned word in a paragraph, excluding punctuation, using an efficient array scan and hash tab…

Easy
821

Shortest Distance to a Character

Compute the minimum distance from each character in a string to a target character using efficient scanning techniques.

Easy
824

Goat Latin

Convert a sentence to Goat Latin by transforming each word based on vowel rules and incremental suffixes efficiently.

Easy
830

Positions of Large Groups

Identify and return intervals of consecutive, large character groups in a string of lowercase letters.

Easy
832

Flipping an Image

Flip each row of a binary matrix horizontally and invert its values efficiently using a two-pointer scanning approach.

Easy
836

Rectangle Overlap

Determine if two axis-aligned rectangles overlap based on their coordinates.

Easy
844

Backspace String Compare

Compare two strings after processing backspaces using efficient two-pointer scanning and careful invariant tracking to e…

Easy
859

Buddy Strings

Determine if two strings can become equal by swapping exactly two letters using a hash table for character tracking.

Easy
860

Lemonade Change

Determine if you can provide exact change to every customer at a lemonade stand using greedy bill management techniques.

Easy
867

Transpose Matrix

Transpose Matrix problem requires flipping a matrix's rows and columns to return the transposed version.

Easy
868

Binary Gap

Find the maximum distance between consecutive 1's in a number's binary form using precise bit manipulation techniques.

Easy
872

Leaf-Similar Trees

Determine if two binary trees have identical leaf sequences using efficient traversal and state tracking techniques.

Easy
876

Middle of the Linked List

Find the middle node of a singly linked list using a two-pointer technique.

Easy
883

Projection Area of 3D Shapes

Calculate the projection area of a 3D shape defined by a grid of towers with varying heights.

Easy
884

Uncommon Words from Two Sentences

Find uncommon words from two sentences by counting word frequencies using hash tables.

Easy
888

Fair Candy Swap

Determine which single candy box Alice and Bob should swap to equalize their total candies using array scanning and hash…

Easy
892

Surface Area of 3D Shapes

Solve the Surface Area of 3D Shapes problem using array manipulation and mathematical formulas to calculate surface area…

Easy
896

Monotonic Array

Determine if an integer array is entirely monotone increasing or decreasing using a clear array-driven approach.

Easy
897

Increasing Order Search Tree

Rearrange a binary search tree so all nodes follow increasing order with only right children using in-order traversal.

Easy
905

Sort Array By Parity

Reorder an integer array so all even numbers come before odd numbers using a precise two-pointer scanning method.

Easy
908

Smallest Range I

Find the smallest score of an array after applying an operation to each element within a given range.

Easy
914

X of a Kind in a Deck of Cards

Solve the problem of determining if a deck can be partitioned into groups with equal occurrences of card values.

Easy
917

Reverse Only Letters

Reverse the characters of a string while skipping non-letter characters using a two-pointer technique.

Easy
922

Sort Array By Parity II

Sort an array where even numbers appear at even indices and odd numbers appear at odd indices using two-pointer scanning…

Easy
925

Long Pressed Name

Check if a typed string could result from long pressing characters while typing a given name using a two-pointer scan.

Easy
929

Unique Email Addresses

Identify the count of unique email addresses by normalizing local names and using hash-based lookups efficiently.

Easy
933

Number of Recent Calls

The "Number of Recent Calls" problem involves designing a class to efficiently track recent requests within a time windo…

Easy
938

Range Sum of BST

Given a BST and a range, calculate the sum of all node values within that range.

Easy
941

Valid Mountain Array

The 'Valid Mountain Array' problem requires determining if an array meets the conditions of a valid mountain array using…

Easy
942

DI String Match

Reconstruct a permutation from a DI string using two-pointer scanning, carefully tracking the increasing and decreasing …

Easy
944

Delete Columns to Make Sorted

The 'Delete Columns to Make Sorted' problem asks to remove unsorted columns from a string array, ensuring all columns ar…

Easy
953

Verifying an Alien Dictionary

Verify if a sequence of words is sorted according to an alien language's custom alphabet order using array scanning and …

Easy
961

N-Repeated Element in Size 2N Array

Find the element that is repeated exactly N times in a 2N-sized array using array scanning and hash lookups.

Easy
965

Univalued Binary Tree

Determine if a binary tree is uni-valued using traversal and state tracking techniques.

Easy
976

Largest Perimeter Triangle

Given an integer array, find the largest perimeter of a triangle formed from three of these lengths.

Easy
977

Squares of a Sorted Array

The problem involves squaring elements of a sorted array and returning the squares in non-decreasing order.

Easy
989

Add to Array-Form of Integer

Compute the sum of an integer and a number represented as an array, efficiently handling digit carries and array travers…

Easy
993

Cousins in Binary Tree

Determine if two nodes in a binary tree are cousins by leveraging binary-tree traversal and state tracking.

Easy
997

Find the Town Judge

Find the Town Judge is an easy LeetCode problem that challenges you to identify a town judge from trust relationships us…

Easy
999

Available Captures for Rook

This problem involves finding the number of pawns a rook can capture on a chessboard, considering obstacles like bishops…

Easy
1002

Find Common Characters

Return an array of common characters from all strings in the given list of words, including duplicates.

Easy
1005

Maximize Sum Of Array After K Negations

Maximize the sum of an integer array after exactly k negations using a greedy approach and invariant tracking for optima…

Easy
1009

Complement of Base 10 Integer

In this problem, you need to return the complement of a given integer by flipping its binary digits.

Easy
1013

Partition Array Into Three Parts With Equal Sum

Determine if an array can be partitioned into three non-empty parts with equal sum using greedy choice and validation.

Easy
1018

Binary Prefix Divisible By 5

Determine which binary prefixes of a given array are divisible by 5 using bit manipulation for efficient checks.

Easy
1021

Remove Outermost Parentheses

Remove Outermost Parentheses simplifies a valid parentheses string by removing the outermost layers of parentheses in ea…

Easy
1022

Sum of Root To Leaf Binary Numbers

Calculate the sum of binary numbers from root to leaf paths in a binary tree.

Easy
1025

Divisor Game

Divisor Game is a game theory problem where players take turns subtracting divisors of a number n until one player loses…

Easy
1030

Matrix Cells in Distance Order

Compute all matrix cell coordinates sorted by Manhattan distance from a given center using array and math techniques eff…

Easy
1037

Valid Boomerang

Determine if three points on a 2D plane form a boomerang, based on distinctness and non-collinearity.

Easy
1046

Last Stone Weight

In the 'Last Stone Weight' problem, we smash the two heaviest stones until one remains, using heaps or sorting.

Easy
1047

Remove All Adjacent Duplicates In String

Solve Remove All Adjacent Duplicates In String by simulating deletions with a stack that collapses matching neighbors im…

Easy
1051

Height Checker

Determine how many students are out of place in a line by comparing their heights to the sorted expected order efficient…

Easy
1071

Greatest Common Divisor of Strings

Find the greatest common divisor string between two strings based on the math and string patterns.

Easy
1078

Occurrences After Bigram

Extract the third word in every adjacent triple of words matching a given bigram pattern from a text.

Easy
1089

Duplicate Zeros

Duplicate each zero in a fixed-length array in place, shifting elements right using a two-pointer scanning approach effi…

Easy
1103

Distribute Candies to People

Distribute candies to people in a way that follows a mathematical pattern, ensuring the distribution is correct.

Easy
1108

Defanging an IP Address

Transform an IPv4 address by replacing each period with '[.]', focusing on a string-driven, direct manipulation approach…

Easy
1122

Relative Sort Array

Sort arr1 by the relative order of arr2, with remaining elements placed in ascending order.

Easy
1128

Number of Equivalent Domino Pairs

Count all pairs of dominoes that are equivalent by scanning the array and using a hash table for fast lookup.

Easy
1137

N-th Tribonacci Number

Compute the N-th Tribonacci number using state transition dynamic programming with careful memoization and iterative upd…

Easy
1154

Day of the Year

Calculate the day number of the year based on a given Gregorian calendar date in the format YYYY-MM-DD.

Easy
1160

Find Words That Can Be Formed by Characters

Compute the total length of words that can be fully constructed from given characters using array scanning and hash mapp…

Easy
1175

Prime Arrangements

Calculate the number of valid permutations of 1 to n where prime numbers occupy prime indices using math-driven logic.

Easy
1184

Distance Between Bus Stops

Compute the minimal distance between two bus stops on a circular route using an array-driven solution approach.

Easy
1185

Day of the Week

Given a date, calculate the corresponding weekday using a math-based strategy, focusing on modular arithmetic.

Easy
1189

Maximum Number of Balloons

Find the maximum number of times the word 'balloon' can be formed from characters of the given string.

Easy
1200

Minimum Absolute Difference

Find all pairs with the minimum absolute difference between two elements in an array, and return them in ascending order…

Easy
1207

Unique Number of Occurrences

Determine if each integer in an array occurs a unique number of times using efficient hash-based counting and verificati…

Easy
1217

Minimum Cost to Move Chips to The Same Position

Compute the minimum cost to move all chips to one position using parity-based greedy moves efficiently.

Easy
1221

Split a String in Balanced Strings

Split a string into the maximum number of balanced substrings where each substring has an equal number of 'L' and 'R'.

Easy
1232

Check If It Is a Straight Line

Determine if a series of coordinates form a straight line on a 2D plane using geometry and mathematical principles.

Easy
1252

Cells with Odd Values in a Matrix

This problem involves updating a matrix based on given indices and counting cells with odd values afterward.

Easy
1260

Shift 2D Grid

Shift 2D Grid requires shifting elements of a matrix by a given number of times, simulating step-by-step movement.

Easy
1266

Minimum Time Visiting All Points

Calculate the minimum seconds required to visit all given 2D points in order using optimal diagonal or straight moves.

Easy
1275

Find Winner on a Tic Tac Toe Game

Determine the winner of a Tic Tac Toe game by scanning moves and using hash lookups for rows, columns, and diagonals eff…

Easy
1281

Subtract the Product and Sum of Digits of an Integer

Calculate the difference between the product and sum of an integer's digits using a simple math-driven approach for effi…

Easy
1287

Element Appearing More Than 25% In Sorted Array

Identify the integer occurring more than 25% in a sorted array using a precise array-driven search strategy for efficien…

Easy
1290

Convert Binary Number in a Linked List to Integer

Convert a binary number represented in a linked list to its decimal value using efficient pointer manipulation.

Easy
1295

Find Numbers with Even Number of Digits

Count the integers in an array that have an even number of digits using a direct array traversal with digit math.

Easy
1299

Replace Elements with Greatest Element on Right Side

Replace every element in an array with the greatest element on its right side, and replace the last element with -1.

Easy
1304

Find N Unique Integers Sum up to Zero

Generate an array of n unique integers that sum to zero using a symmetric pairing strategy to ensure balance.

Easy
1309

Decrypt String from Alphabet to Integer Mapping

Decrypt a string using alphabet-to-integer mapping, considering the presence of '#' as a special delimiter.

Easy
1313

Decompress Run-Length Encoded List

Decompress a run-length encoded list by expanding each pair into repeated values based on frequency.

Easy
1317

Convert Integer to the Sum of Two No-Zero Integers

Find two positive integers whose sum equals n and neither contains the digit zero, using a direct math-driven approach.

Easy
1323

Maximum 69 Number

Maximize a number by flipping at most one digit from 6 to 9 or vice versa.

Easy
1331

Rank Transform of an Array

Transform the elements of an array into their ranks, where the rank represents the size order of the elements.

Easy
1332

Remove Palindromic Subsequences

This problem challenges you to remove palindromic subsequences from a string with a minimum number of steps using two-po…

Easy
1337

The K Weakest Rows in a Matrix

Find the k weakest rows in a binary matrix where rows contain soldiers and civilians, using sorting and binary search te…

Easy
1342

Number of Steps to Reduce a Number to Zero

Reduce a number to zero using bit manipulation and math. Simulate the process step-by-step based on whether the number i…

Easy
1346

Check If N and Its Double Exist

Solve Check If N and Its Double Exist by scanning once and checking doubles or halves in a hash set.

Easy
1351

Count Negative Numbers in a Sorted Matrix

Count Negative Numbers in a Sorted Matrix requires counting negative numbers in a matrix sorted in non-increasing order …

Easy
1356

Sort Integers by The Number of 1 Bits

Sort an array of integers by the number of 1's in their binary representation and then by their value in case of ties.

Easy
1360

Number of Days Between Two Dates

Calculate the exact number of days between two dates using string parsing and arithmetic logic with consistent accuracy.

Easy
1365

How Many Numbers Are Smaller Than the Current Number

In this problem, you need to determine how many numbers are smaller than each element in an array, focusing on array sca…

Easy
1370

Increasing Decreasing String

Reorder the string based on a specific algorithm using hash tables and string manipulation.

Easy
1374

Generate a String With Characters That Have Odd Counts

Generate a string of n characters where each character appears an odd number of times, using a string-driven approach.

Easy
1379

Find a Corresponding Node of a Binary Tree in a Clone of That Tree

Find the corresponding node in a cloned binary tree using binary-tree traversal and state tracking.

Easy
1380

Lucky Numbers in a Matrix

The Lucky Numbers in a Matrix problem involves finding elements that are the minimum in their row and maximum in their c…

Easy
1385

Find the Distance Value Between Two Arrays

Calculate the distance value between two integer arrays by determining how many elements in arr1 don't have a close coun…

Easy
1389

Create Target Array in the Given Order

Learn how to efficiently create a target array by inserting elements at specified indices using array simulation techniq…

Easy
1394

Find Lucky Integer in an Array

Identify the largest lucky integer in an array by counting frequencies and comparing values with their occurrences effic…

Easy
1399

Count Largest Group

Count the number of groups with the largest size by summing digits of numbers from 1 to n using a hash table approach.

Easy
1403

Minimum Subsequence in Non-Increasing Order

Find the minimum subsequence in non-increasing order such that its sum exceeds the sum of non-included elements.

Easy
1408

String Matching in an Array

Identify all strings in an array that appear as substrings of other strings, focusing on array and string matching patte…

Easy
1413

Minimum Value to Get Positive Step by Step Sum

Find the minimum starting value to ensure the step-by-step sum of an array is always at least 1.

Easy
1417

Reformat The String

Reformat The String involves rearranging alphanumeric characters in a string so that no adjacent characters have the sam…

Easy
1422

Maximum Score After Splitting a String

Find the optimal split point in a binary string to maximize zeros on the left and ones on the right efficiently.

Easy
1431

Kids With the Greatest Number of Candies

Determine which kids, after receiving extra candies, will have the greatest number of candies in a group.

Easy
1436

Destination City

Find the destination city from a list of paths where each path connects two cities. The city with no outgoing path is th…

Easy
1437

Check If All 1's Are at Least Length K Places Away

Check if all 1's in a binary array are at least k places away from each other.

Easy
1446

Consecutive Characters

Find the power of a string by determining the length of its longest substring with a unique character.

Easy
1450

Number of Students Doing Homework at a Given Time

Count the number of students doing homework at a given time using an array-driven solution approach.

Easy
1455

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

Determine the first word in a sentence where a given searchWord is a prefix using two-pointer scanning with string match…

Easy
1460

Make Two Arrays Equal by Reversing Subarrays

Solve Make Two Arrays Equal by Reversing Subarrays by checking whether target and arr contain the same values with match…

Easy
1464

Maximum Product of Two Elements in an Array

Find the maximum product of two elements in an array by carefully selecting indices and leveraging sorting for efficienc…

Easy
1470

Shuffle the Array

Shuffle the Array requires an efficient approach to rearrange elements using an array-driven solution strategy with two …

Easy
1475

Final Prices With a Special Discount in a Shop

Calculate final prices with discounts applied in a shop using a stack-based state management approach to find the correc…

Easy
1480

Running Sum of 1d Array

Calculate the running sum of a given 1D array by updating each element to the sum of itself and all previous elements.

Easy
1486

XOR Operation in an Array

Compute the bitwise XOR of a dynamically generated array using a combination of math and bit manipulation techniques eff…

Easy
1491

Average Salary Excluding the Minimum and Maximum Salary

Calculate the average salary of employees, excluding the highest and lowest salaries, from an array of unique salaries.

Easy
1496

Path Crossing

Check if a path crosses itself on a 2D plane using a hash table to track visited points during traversal.

Easy
1502

Can Make Arithmetic Progression From Sequence

Determine if a given array can be rearranged into a valid arithmetic progression using sorting and consecutive differenc…

Easy
1507

Reformat Date

Reformat Date requires transforming a date string from human-readable form to YYYY-MM-DD using a string-driven strategy …

Easy
1512

Number of Good Pairs

Count all index pairs in an array where elements match and the first index is smaller, using hash-based scanning efficie…

Easy
1518

Water Bottles

Maximize the number of water bottles you can drink by simulating the exchange process between full and empty bottles.

Easy
1523

Count Odd Numbers in an Interval Range

Count Odd Numbers in an Interval Range efficiently using a math-driven formula that avoids unnecessary iteration over la…

Easy
1528

Shuffle String

Reorder characters in a string using a given indices array to reconstruct the intended output efficiently and correctly.

Easy
1534

Count Good Triplets

Count Good Triplets requires identifying all triplets in an array that satisfy multiple absolute difference constraints …

Easy
1539

Kth Missing Positive Number

Find the kth missing positive integer in a strictly increasing array using binary search over the answer space efficient…

Easy
1544

Make The String Great

This problem requires removing adjacent characters that cancel each other out, leveraging stack-based state management.

Easy
1550

Three Consecutive Odds

Determine if an integer array contains three consecutive odd numbers using a direct array-driven solution strategy for f…

Easy
1556

Thousand Separator

Convert a given integer into a string with dots as thousand separators using a precise string-driven strategy.

Easy
1560

Most Visited Sector in a Circular Track

Determine which sectors on a circular track are visited most frequently using array and simulation techniques efficientl…

Easy
1566

Detect Pattern of Length M Repeated K or More Times

Determine if a subarray of length m repeats k or more consecutive times in a given integer array efficiently.

Easy
1572

Matrix Diagonal Sum

Calculate the sum of both primary and secondary diagonals in a square matrix while avoiding double-counting overlaps.

Easy
1576

Replace All ?'s to Avoid Consecutive Repeating Characters

Solve LeetCode 1576 by scanning left to right and replacing each ? with a letter different from its neighbors.

Easy
1582

Special Positions in a Binary Matrix

Identify all special positions in a binary matrix where a 1 has no other 1s in its row or column, ensuring optimal array…

Easy
1588

Sum of All Odd Length Subarrays

Calculate the sum of all odd-length subarrays in a given integer array using efficient array and math strategies.

Easy
1592

Rearrange Spaces Between Words

Rearrange spaces between words by distributing them evenly, placing any leftover spaces at the end to match original tex…

Easy
1598

Crawler Log Folder

Simulate folder navigation based on a list of operations to determine the current folder depth.

Easy
1603

Design Parking System

Implement a class to manage a parking lot with fixed slots for big, medium, and small cars, tracking occupancy efficient…

Easy
1608

Special Array With X Elements Greater Than or Equal X

Determine if an array has exactly x elements greater than or equal to x using binary search over the answer space.

Easy
1614

Maximum Nesting Depth of the Parentheses

Find the maximum nesting depth of parentheses in a valid string using stack-based state management.

Easy
1619

Mean of Array After Removing Some Elements

Calculate the trimmed mean by removing the lowest and highest 5% of elements in an array using sorting for accuracy and …

Easy
1624

Largest Substring Between Two Equal Characters

Find the longest substring between two equal characters using a hash table for optimized performance.

Easy
1629

Slowest Key

Determine which key had the longest press duration in a sequence using array indices and string mapping, resolving ties …

Easy
1636

Sort Array by Increasing Frequency

Sort Array by Increasing Frequency requires counting each element and ordering them by frequency, breaking ties with des…

Easy
1637

Widest Vertical Area Between Two Points Containing No Points

Find the maximum width of a vertical area between points with no points inside using array sorting efficiently.

Easy
1640

Check Array Formation Through Concatenation

Determine if an array can be formed by concatenating subarrays without reordering individual elements, using hash lookup…

Easy
1646

Get Maximum in Generated Array

Compute the maximum value in a generated array using defined recurrence rules, leveraging array simulation techniques ef…

Easy
1652

Defuse the Bomb

Defuse the Bomb uses a sliding window to update a circular array based on a key, with efficient state updates.

Easy
1656

Design an Ordered Stream

Design an Ordered Stream that returns values in increasing order based on unique integer IDs with efficient insertion an…

Easy
1662

Check If Two String Arrays are Equivalent

Determine if two string arrays form identical strings by concatenating elements in order, handling subtle array-length m…

Easy
1668

Maximum Repeating Substring

Find the maximum number of times a given word repeats consecutively in a string using state transition dynamic programmi…

Easy
1672

Richest Customer Wealth

Calculate the richest customer's wealth by summing the amounts in each customer's bank accounts in a matrix.

Easy
1678

Goal Parser Interpretation

Interpret the Goal Parser's output by analyzing a command string containing 'G', '()', and '(al)' patterns.

Easy
1684

Count the Number of Consistent Strings

Count the number of strings fully composed of allowed characters using array scanning and hash lookup for efficiency.

Easy
1688

Count of Matches in Tournament

Calculate the total matches in a tournament by simulating rounds and applying simple math rules for advancing teams.

Easy
1694

Reformat Phone Number

Reformat a phone number by removing spaces and dashes, grouping digits into blocks of 3 or 2, and joining them with dash…

Easy
1700

Number of Students Unable to Eat Lunch

Simulate a queue of students with sandwich preferences and determine how many can't eat based on available sandwiches.

Easy
1704

Determine if String Halves Are Alike

Check if two halves of a string contain the same number of vowels using a character counting approach efficiently.

Easy
1710

Maximum Units on a Truck

Maximize total units loaded on a truck by choosing boxes greedily based on highest units per box within truck capacity l…

Easy
1716

Calculate Money in Leetcode Bank

Calculate the total amount of money in the Leetcode bank at the end of the nth day, based on a weekly increasing deposit…

Easy
1720

Decode XORed Array

Recover the original integer array from its XOR-encoded version using direct bitwise manipulation and sequential reconst…

Easy
1725

Number Of Rectangles That Can Form The Largest Square

Determine how many rectangles can be trimmed to form the largest possible square using an array-driven solution strategy…

Easy
1732

Find the Highest Altitude

Find the highest altitude after a series of altitude changes during a road trip using prefix sum technique.

Easy
1736

Latest Time by Replacing Hidden Digits

Determine the latest valid time by replacing hidden digits using a greedy choice and invariant validation strategy effic…

Easy
1742

Maximum Number of Balls in a Box

The problem asks you to find the box with the maximum number of balls based on the sum of digits of ball numbers.

Easy
1748

Sum of Unique Elements

Given an array, find the sum of all its unique elements by identifying those that appear only once.

Easy
1752

Check if Array Is Sorted and Rotated

Determine if a given integer array is sorted in non-decreasing order and then rotated, handling duplicates correctly.

Easy
1758

Minimum Changes To Make Alternating Binary String

Find the minimum number of changes required to convert a string into an alternating binary string.

Easy
1763

Longest Nice Substring

Find the longest nice substring in a given string using the sliding window technique with running state updates.

Easy
1768

Merge Strings Alternately

Merge two strings alternately, starting with the first string, and append extra characters when one string is longer.

Easy
1773

Count Items Matching a Rule

Count Items Matching a Rule is an easy problem that tests array and string manipulation with conditions based on specifi…

Easy
1779

Find Nearest Point That Has the Same X or Y Coordinate

Find the nearest point with the same x or y coordinate using Manhattan distance. Return its index or -1 if none exists.

Easy
1784

Check if Binary String Has at Most One Segment of Ones

Check if a binary string contains at most one contiguous segment of ones.

Easy
1790

Check if One String Swap Can Make Strings Equal

Check if one string swap can make two equal strings using hash table and string counting methods.

Easy
1791

Find Center of Star Graph

Find the center node of a star graph, where one node connects to all others.

Easy
1796

Second Largest Digit in a String

Given a string with alphanumeric characters, find the second largest digit, or return -1 if it doesn’t exist.

Easy
1800

Maximum Ascending Subarray Sum

Solve Maximum Ascending Subarray Sum by scanning once, extending rising runs, and resetting the running sum at each drop…

Easy
1805

Number of Different Integers in a String

Count all unique integers in a string by replacing letters and handling leading zeros correctly with a hash table approa…

Easy
1812

Determine Color of a Chessboard Square

Determine whether a given chessboard square is white or black by converting coordinates using a math plus string approac…

Easy
1816

Truncate Sentence

Truncate a sentence to contain only the first k words by converting it into an array of words.

Easy
1822

Sign of the Product of an Array

Determine the sign of a product from an integer array using a single pass without computing the full product.

Easy
1827

Minimum Operations to Make the Array Increasing

Calculate the minimum number of increments required to transform a given integer array into a strictly increasing sequen…

Easy
1832

Check if the Sentence Is Pangram

Determine if a given lowercase string contains every English letter using efficient hash table tracking techniques.

Easy
1837

Sum of Digits in Base K

Calculate the sum of digits of a number after converting it from base 10 to any given base using a math-driven approach.

Easy
1844

Replace All Digits with Characters

Transform a string by replacing digits at odd indices using the preceding character with a shift operation for accurate …

Easy
1848

Minimum Distance to the Target Element

Solve Minimum Distance to the Target Element by scanning the array and tracking the smallest distance from start.

Easy
1854

Maximum Population Year

Find the earliest year with the highest population using an array plus counting approach.

Easy
1859

Sorting the Sentence

Reconstruct a shuffled sentence by sorting words using their embedded indices to restore the original sentence order eff…

Easy
1863

Sum of All Subset XOR Totals

Compute the sum of all subset XOR totals using a backtracking search with pruning for arrays of small size.

Easy
1869

Longer Contiguous Segments of Ones than Zeros

Determine if the longest segment of 1s in a binary string is strictly longer than the longest segment of 0s.

Easy
1876

Substrings of Size Three with Distinct Characters

Count all substrings of length three in a string where each character is unique using sliding window techniques efficien…

Easy
1880

Check if Word Equals Summation of Two Words

Check if the sum of two word values equals a target word's value by converting letters to their numeric representations.

Easy
1886

Determine Whether Matrix Can Be Obtained By Rotation

Determine if a binary matrix can be transformed into another by rotating it 90 degrees multiple times.

Easy
1893

Check if All the Integers in a Range Are Covered

Check if all integers in the range [left, right] are covered by intervals in a given set of ranges.

Easy
1897

Redistribute Characters to Make All Strings Equal

Determine if you can redistribute characters among strings so that all strings become identical using a counting approac…

Easy
1903

Largest Odd Number in String

Find the largest odd number in a string using a greedy approach with careful digit inspection and invariant checks.

Easy
1909

Remove One Element to Make the Array Strictly Increasing

Determine if removing a single element from an array can make it strictly increasing, using a careful index check approa…

Easy
1913

Maximum Product Difference Between Two Pairs

Find the maximum product difference between two pairs in an integer array using sorting for optimal selection.

Easy
1920

Build Array from Permutation

The problem asks to build an array from a given permutation using an efficient approach.

Easy
1925

Count Square Sum Triples

Count Square Sum Triples asks to find the number of integer triples where a² + b² = c² for values between 1 and n.

Easy
1929

Concatenation of Array

This problem asks you to create an array of double the size, where each element is repeated twice in sequence.

Easy
1935

Maximum Number of Words You Can Type

Determine how many words can be typed on a malfunctioning keyboard with some broken keys.

Easy
1941

Check if All Characters Have Equal Number of Occurrences

Check if a string has characters with equal occurrences using hash tables and string manipulation techniques.

Easy
1945

Sum of Digits of String After Convert

Convert a lowercase string into digits and repeatedly sum them k times using a direct string plus simulation approach.

Easy
1952

Three Divisors

Determine if a given integer has exactly three positive divisors.

Easy
1957

Delete Characters to Make Fancy String

This problem asks to remove the minimum number of characters from a string to ensure no three consecutive characters are…

Easy
1961

Check If String Is a Prefix of Array

Determine if a string is a prefix of an array by concatenating initial elements, using two-pointer scanning efficiently.

Easy
1967

Number of Strings That Appear as Substrings in Word

Count how many strings in an array appear as substrings within a given word by checking each pattern individually.

Easy
1971

Find if Path Exists in Graph

Determine if a valid path exists between two vertices in a bi-directional graph using traversal techniques.

Easy
1974

Minimum Time to Type Word Using Special Typewriter

Compute the minimum typing time by greedily taking the shorter circular move between consecutive letters, then adding on…

Easy
1979

Find Greatest Common Divisor of Array

Find the greatest common divisor of the smallest and largest numbers in an integer array.

Easy
1984

Minimum Difference Between Highest and Lowest of K Scores

Minimize the difference between the highest and lowest of k student scores using a sliding window approach.

Easy
1991

Find the Middle Index in Array

Find the smallest middle index where the sum of elements on the left equals the sum on the right using prefix sums effic…

Easy
1995

Count Special Quadruplets

Count Special Quadruplets requires scanning arrays and using hash lookups to efficiently find quadruplets matching sum c…

Easy
2000

Reverse Prefix of Word

Reverse the prefix of a string starting from index 0 to the first occurrence of a given character.

Easy
2006

Count Number of Pairs With Absolute Difference K

Find how many pairs (i, j) with i < j satisfy |nums[i] - nums[j]| == k using array scanning and hash lookup.

Easy
2011

Final Value of Variable After Performing Operations

Compute the final value of X by simulating each string operation in the array sequentially with careful tracking.

Easy
2016

Maximum Difference Between Increasing Elements

Find the maximum difference between two increasing elements in an array using a linear scan to track the minimum value e…

Easy
2022

Convert 1D Array Into 2D Array

Convert a 1D integer array into a structured 2D array with specified rows and columns using all elements sequentially.

Easy
2027

Minimum Moves to Convert String

Minimize moves to convert a string of 'X' and 'O' to all 'O' by converting three consecutive characters to 'O'.

Easy
2032

Two Out of Three

Identify all elements appearing in at least two of three arrays using efficient scanning and hash lookups for fast verif…

Easy
2037

Minimum Number of Moves to Seat Everyone

Calculate the minimum total moves to seat each student using greedy assignment and invariant validation efficiently.

Easy
2042

Check if Numbers Are Ascending in a Sentence

Check if the numbers in a sentence are strictly increasing from left to right using string tokenization.

Easy
2047

Number of Valid Words in a Sentence

Count all valid words in a sentence by analyzing each token with precise string-driven validation rules efficiently.

Easy
2053

Kth Distinct String in an Array

Find the kth distinct string in an array by identifying strings that appear only once, using efficient array scanning an…

Easy
2057

Smallest Index With Equal Value

Find the smallest index where the index mod 10 equals the value at that index in the given array.

Easy
2062

Count Vowel Substrings of a String

Count the number of vowel substrings that include all five vowels in a string.

Easy
2068

Check Whether Two Strings are Almost Equivalent

Solve Check Whether Two Strings are Almost Equivalent by counting letters and rejecting any character whose frequency ga…

Easy
2073

Time Needed to Buy Tickets

Calculate the total time for a specific person to buy all their tickets using queue-driven state processing.

Easy
2078

Two Furthest Houses With Different Colors

Maximize the distance between two houses with different colors by using a greedy approach and validating the choice.

Easy
2085

Count Common Words With One Occurrence

Learn how to efficiently count strings appearing exactly once in both arrays using array scanning and hash lookup patter…

Easy
2089

Find Target Indices After Sorting Array

Find the target indices of a sorted array and return them in increasing order using binary search and sorting techniques…

Easy
2094

Finding 3-Digit Even Numbers

Generate unique 3-digit even numbers from a given array of digits with duplicates.

Easy
2099

Find Subsequence of Length K With the Largest Sum

Pick the k largest values, then restore their original order to build the maximum-sum subsequence correctly.

Easy
2103

Rings and Rods

Count how many rods have all three colors using a hash table to track colors per rod efficiently in strings.

Easy
2108

Find First Palindromic String in the Array

Return the first palindromic string from an array of words or an empty string if none exists.

Easy
2114

Maximum Number of Words Found in Sentences

Find the maximum number of words in a single sentence from an array of sentences using array and string processing techn…

Easy
2119

A Number After a Double Reversal

Determine if reversing a number twice returns the original integer by analyzing trailing zeros and digit placement.

Easy
2124

Check if All A's Appears Before All B's

Determine if all 'a's in a string appear before any 'b's using a direct string-driven check strategy for clarity and cor…

Easy
2129

Capitalize the Title

Capitalize the Title requires transforming each word based on length, applying uppercase and lowercase rules precisely p…

Easy
2133

Check if Every Row and Column Contains All Numbers

Determine if every row and column in a square matrix contains all numbers from 1 to n without repetition using array sca…

Easy
2138

Divide a String Into Groups of Size k

Divide a string into equal groups of size k, using a fill character to complete the last group if needed.

Easy
2144

Minimum Cost of Buying Candies With Discount

Minimize the total cost of buying candies using a greedy approach with a discount system based on candy prices.

Easy
2148

Count Elements With Strictly Smaller and Greater Elements

Count elements in an array that have both strictly smaller and strictly greater numbers using array sorting efficiently.

Easy
2154

Keep Multiplying Found Values by Two

The "Keep Multiplying Found Values by Two" problem involves repeatedly multiplying a number by two if it is found in an …

Easy
2160

Minimum Sum of Four Digit Number After Splitting Digits

Find the minimum sum of two 2-digit numbers by splitting a four-digit number into two integers.

Easy
2164

Sort Even and Odd Indices Independently

Rearrange a 0-indexed array by sorting even and odd indices independently for predictable order and correctness.

Easy
2169

Count Operations to Obtain Zero

Simulate operations on two integers until one becomes zero, counting how many steps it takes to achieve the result.

Easy
2176

Count Equal and Divisible Pairs in an Array

Given an array, count pairs of elements that are equal and their indices product is divisible by a given integer.

Easy
2180

Count Integers With Even Digit Sum

Solve this Easy Math plus Simulation problem by counting numbers whose digit sums are even up to a given limit efficient…

Easy
2185

Counting Words With a Given Prefix

Count how many words in a list start with a given prefix.

Easy
2190

Most Frequent Number Following Key In an Array

Scan the array once, count which value appears right after the key, and return the uniquely most frequent follower.

Easy
2194

Cells in a Range on an Excel Sheet

This problem requires extracting a range of cells from an Excel-like sheet based on a string input and returning them in…

Easy
2200

Find All K-Distant Indices in an Array

Identify all indices in an array that are within k distance of elements equal to the given key using two-pointer scannin…

Easy
2206

Divide Array Into Equal Pairs

Determine if an array of 2n integers can be partitioned into n pairs where each pair contains identical elements using h…

Easy
2210

Count Hills and Valleys in an Array

Count Hills and Valleys in an Array determines the number of hills and valleys in a given array by analyzing index neigh…

Easy
2215

Find the Difference of Two Arrays

Find the Difference of Two Arrays helps you identify unique elements between two integer arrays using array scanning and…

Easy
2220

Minimum Bit Flips to Convert Number

Determine the minimum number of bit flips required to convert one integer to another using precise bit manipulation.

Easy
2224

Minimum Number of Operations to Convert Time

The problem asks to find the minimum number of operations to convert one time string to another using specific time incr…

Easy
2231

Largest Number After Digit Swaps by Parity

Maximize a number by swapping digits of the same parity using sorting and priority queue techniques efficiently.

Easy
2235

Add Two Integers

This problem asks to return the sum of two integers within a specific range, focusing on math-driven solution strategy.

Easy
2236

Root Equals Sum of Children

Check if a binary tree root value equals the sum of its immediate left and right child nodes efficiently.

Easy
2239

Find Closest Number to Zero

Identify the number in an integer array that is closest to zero, returning the larger one if tied.

Easy
2243

Calculate Digit Sum of a String

Learn how to repeatedly sum digit groups in a string until its length is at most k using string simulation techniques.

Easy
2248

Intersection of Multiple Arrays

Find integers that are common across all arrays in a given list of arrays.

Easy
2255

Count Prefixes of a Given String

Count Prefixes of a Given String is a problem that involves finding the number of string prefixes in an array that match…

Easy
2259

Remove Digit From Number to Maximize Result

Determine the largest possible number by removing one specific digit using a greedy approach and string iteration.

Easy
2264

Largest 3-Same-Digit Number in String

Find the largest 3-same-digit number within a string of digits using a string-driven solution approach.

Easy
2269

Find the K-Beauty of a Number

Calculate the k-beauty of a number by counting substrings of length k that divide the original number evenly using a sli…

Easy
2273

Find Resultant Array After Removing Anagrams

This problem requires removing adjacent anagrams from a list of words using an array scanning and hash lookup approach.

Easy
2278

Percentage of Letter in String

Calculate the percentage of a specific letter in a string using a direct string-driven counting approach, rounding down …

Easy
2283

Check if Number Has Equal Digit Count and Digit Value

Determine if a number's digits correspond to their counts in the string representation.

Easy
2287

Rearrange Characters to Make Target String

Calculate the maximum copies of a target string from letters in s using frequency counting and hash tables efficiently.

Easy
2293

Min Max Game

The Min Max Game problem requires simulating an array reduction process to find the last remaining number.

Easy
2299

Strong Password Checker II

Check if a given password meets all strength requirements, including length, character types, and no adjacent repeated c…

Easy
2303

Calculate Amount Paid in Taxes

Calculate the total tax owed by iterating through sorted brackets and applying each rate incrementally to your income.

Easy
2309

Greatest English Letter in Upper and Lower Case

Find the greatest English letter that exists in both lowercase and uppercase in a string using a hash table approach.

Easy
2315

Count Asterisks

The 'Count Asterisks' problem asks you to count '*' excluding those between pairs of '|' in a string.

Easy
2319

Check if Matrix Is X-Matrix

Check if a square matrix follows the X-Matrix pattern by validating diagonal and non-diagonal conditions.

Easy
2325

Decode the Message

Decode the Message is an easy problem involving hash table mapping for string decoding based on a cipher key.

Easy
2331

Evaluate Boolean Binary Tree

Determine the boolean outcome of a full binary tree by evaluating leaf and internal nodes using depth-first traversal.

Easy
2335

Minimum Amount of Time to Fill Cups

Determine the minimum seconds to fill cups of cold, warm, and hot water using a greedy selection strategy and invariant …

Easy
2341

Maximum Number of Pairs in Array

Given an array, count how many pairs can be formed and how many leftovers remain after pairing.

Easy
2347

Best Poker Hand

Determine the strongest poker hand from five cards using array scanning and hash table counting techniques efficiently.

Easy
2351

First Letter to Appear Twice

Find the first letter that repeats in a string using hash table tracking and early detection for efficiency.

Easy
2357

Make Array Zero by Subtracting Equal Amounts

Minimize operations to make all array elements zero by subtracting equal amounts in each operation.

Easy
2363

Merge Similar Items

Merge Similar Items combines values and weights from two lists, returning the result sorted by value.

Easy
2367

Number of Arithmetic Triplets

Count the number of arithmetic triplets in a given strictly increasing array with a specified difference.

Easy
2373

Largest Local Values in a Matrix

Find the largest value in every 3x3 submatrix of an n x n integer matrix efficiently using nested loops.

Easy
2379

Minimum Recolors to Get K Consecutive Black Blocks

Given a string of blocks, determine the minimum number of recolors needed to get k consecutive black blocks.

Easy
2383

Minimum Hours of Training to Win a Competition

Find the minimum hours of training needed to beat all opponents in a competition based on energy and experience.

Easy
2389

Longest Subsequence With Limited Sum

Find the maximum size of a subsequence from nums with a sum less than or equal to each query value.

Easy
2395

Find Subarrays With Equal Sum

Find Subarrays With Equal Sum is solved by scanning adjacent pairs and storing each length-2 sum in a hash set.

Easy
2399

Check Distances Between Same Letters

Verify if each pair of identical letters in a string has the exact number of letters between them as specified in a dist…

Easy
2404

Most Frequent Even Element

Identify the most frequent even element in an array using counting and hash lookup, handling ties by choosing the smalle…

Easy
2409

Count Days Spent Together

Count the total number of days Alice and Bob are in Rome together, given their arrival and departure dates.

Easy
2413

Smallest Even Multiple

Find the smallest even multiple of a given integer using math and number theory concepts efficiently.

Easy
2418

Sort the People

Sort the People requires pairing names with heights and sorting them in descending height order efficiently using arrays…

Easy
2423

Remove Letter To Equalize Frequency

Determine if removing a single letter from a string can make all remaining letters have identical frequency efficiently.

Easy
2427

Number of Common Factors

The problem asks to find the number of common factors of two positive integers a and b.

Easy
2432

The Employee That Worked on the Longest Task

Identify which employee spent the longest time on a task using an array-driven approach, analyzing each log entry effici…

Easy
2437

Number of Valid Clock Times

Calculate how many valid digital clock times can be formed by replacing unknown digits in a string format hh:mm.

Easy
2441

Largest Positive Integer That Exists With Its Negative

Find the largest positive integer in an array such that its negative counterpart also exists.

Easy
2446

Determine if Two Events Have Conflict

Compare two same-day time intervals and check whether their inclusive endpoints overlap after converting HH:MM strings i…

Easy
2451

Odd String Difference

Identify the one string in an array whose consecutive letter differences deviate from all others using array scanning pl…

Easy
2455

Average Value of Even Numbers That Are Divisible by Three

Find the average of even numbers divisible by 3 from an array of positive integers.

Easy
2460

Apply Operations to an Array

Transform an array by applying adjacent doubling operations and shifting zeros efficiently using two-pointer scanning te…

Easy
2465

Number of Distinct Averages

Calculate the number of unique averages formed by repeatedly pairing smallest and largest elements efficiently using has…

Easy
2469

Convert the Temperature

Convert the given Celsius temperature to Kelvin and Fahrenheit using mathematical formulas and return the result in an a…

Easy
2475

Number of Unequal Triplets in Array

Count all triplets in a positive integer array where each element is distinct using scanning and hash lookup efficiently…

Easy
2481

Minimum Cuts to Divide a Circle

Calculate the fewest cuts required to divide a circle into n equal slices using math and geometric reasoning efficiently…

Easy
2485

Find the Pivot Integer

Find the Pivot Integer problem challenges you to identify an integer x that balances prefix sums on both sides.

Easy
2490

Circular Sentence

Determine if a sentence is circular by verifying each word's last character matches the next word's first character effi…

Easy
2496

Maximum Value of a String in an Array

The problem requires finding the maximum value of alphanumeric strings in an array based on length or numeric value.

Easy
2500

Delete Greatest Value in Each Row

Calculate the total of removed maximum values from each row of a matrix, iterating until all columns are deleted efficie…

Easy
2506

Count Pairs Of Similar Strings

Count similar string pairs by converting each word into a character-set signature and counting matching signatures effic…

Easy
2511

Maximum Enemy Forts That Can Be Captured

Find the maximum number of enemy forts that can be captured by moving your army using two-pointer scanning with invarian…

Easy
2515

Shortest Distance to Target String in a Circular Array

Find the shortest distance to a target string in a circular array with either left or right movement options.

Easy
2520

Count the Digits That Divide a Number

Count the digits that divide a number by checking each digit's divisibility.

Easy
2525

Categorize Box According to Criteria

Classify a box as "Heavy", "Bulky", or "Neither" based on its dimensions and mass using math-driven strategies.

Easy
2529

Maximum Count of Positive Integer and Negative Integer

Compute the maximum count between positive and negative integers in a sorted array using efficient binary search countin…

Easy
2535

Difference Between Element Sum and Digit Sum of an Array

Find the absolute difference between element sum and digit sum of an array of integers.

Easy
2540

Minimum Common Value

Find the smallest integer appearing in both sorted arrays efficiently using array scanning and hash-based lookup techniq…

Easy
2544

Alternating Digit Sum

Compute the alternating digit sum by applying a sign to each digit and summing efficiently using a math-driven approach.

Easy
2549

Count Distinct Numbers on Board

Compute the number of distinct integers generated on a board using repeated modulo operations over a long sequence of da…

Easy
2553

Separate the Digits in an Array

Given an array of positive integers, separate each integer into its individual digits while preserving the original orde…

Easy
2558

Take Gifts From the Richest Pile

Take Gifts From the Richest Pile uses a heap to simulate the process of taking gifts from the richest pile over a number…

Easy
2562

Find the Array Concatenation Value

Compute the array concatenation value efficiently using two-pointer scanning while maintaining a running total of concat…

Easy
2566

Maximum Difference by Remapping a Digit

Find the largest difference by remapping a single digit in a number using a greedy approach to maximize and minimize out…

Easy
2570

Merge Two 2D Arrays by Summing Values

Merge two 2D arrays by summing values with matching ids using array scanning and hash lookup efficiently.

Easy
2574

Left and Right Sum Differences

Compute absolute differences between left and right cumulative sums for each element in an integer array efficiently.

Easy
2578

Split With Minimum Sum

Split a positive integer into two parts to minimize their sum using a greedy approach and sorting.

Easy
2582

Pass the Pillow

Pass the Pillow simulates the process of passing an item through a line of people, adjusting the direction based on time…

Easy
2586

Count the Number of Vowel Strings in Range

Count the Number of Vowel Strings in Range asks to count vowel strings in a subarray of a given word list.

Easy
2591

Distribute Money to Maximum Children

Determine the maximum number of children who can each receive exactly 8 dollars using a greedy approach with validation …

Easy
2595

Number of Even and Odd Bits

Count the number of 1s at even and odd indices in the binary representation of a given integer n.

Easy
2600

K Items With the Maximum Sum

Select k items from a bag containing 1, 0, and -1 to maximize sum using greedy choice and invariant validation strategie…

Easy
2605

Form Smallest Number From Two Digit Arrays

Given two arrays of digits, find the smallest possible number formed by one digit from each array.

Easy
2609

Find the Longest Balanced Substring of a Binary String

Find the longest balanced substring of a binary string where zeroes precede ones and counts of each are equal.

Easy
2614

Prime In Diagonal

Find the largest prime number located on any diagonal of a square matrix using array iteration and prime checking techni…

Easy
2619

Array Prototype Last

Implement a method on all arrays that returns the last element or -1 for empty arrays, using Array.prototype correctly.

Easy
2620

Counter

Implement a counter function that returns increasing integers starting from a given initial value with each call, levera…

Easy
2621

Sleep

Create an asynchronous function that sleeps for a given number of milliseconds and resolves any value.

Easy
2626

Array Reduce Transformation

Implement the Array Reduce Transformation pattern by applying a reducer function on an array with a given initial value.

Easy
2629

Function Composition

Learn how to implement function composition by combining multiple functions into a single callable operation efficiently…

Easy
2634

Filter Elements from Array

Filter elements from an array based on a custom function using core interview patterns.

Easy
2635

Apply Transform Over Each Element in Array

Transform each element in an array based on a given function without using the built-in Array.map method.

Easy
2639

Find the Width of Columns of a Grid

This problem asks you to compute the width of each column in a grid, where the width is defined by the length of the lar…

Easy
2643

Row With Maximum Ones

Find the row with the maximum ones in a binary matrix and return its index and count.

Easy
2644

Find the Maximum Divisibility Score

Determine the divisor with the highest count of divisible elements in an array using a clear array-driven strategy.

Easy
2648

Generate Fibonacci Sequence

Implement a generator that produces the Fibonacci sequence up to a specified number of elements efficiently in JavaScrip…

Easy
2651

Calculate Delayed Arrival Time

Calculate the new arrival time of a delayed train in 24-hour format by using basic math operations.

Easy
2652

Sum Multiples

Find the sum of integers divisible by 3, 5, or 7 in the range [1, n].

Easy
2656

Maximum Sum With Exactly K Elements

Maximize your score by performing exactly k operations on an array using a greedy approach to select the highest values.

Easy
2660

Determine the Winner of a Bowling Game

Simulate a bowling game to determine the winner based on hit pins per turn for two players.

Easy
2665

Counter II

Implement a counter with functions to increment, decrement, and reset it based on an initial value.

Easy
2666

Allow One Function Call

Learn how to wrap a function so it executes at most once, capturing results while ignoring extra calls efficiently.

Easy
2667

Create Hello World Function

The Create Hello World Function problem tests a candidate's ability to return a constant value from a function regardles…

Easy
2670

Find the Distinct Difference Array

Calculate the distinct difference array of a given list of integers by counting distinct elements in the prefix and suff…

Easy
2677

Chunk Array

Chunk Array splits a given array into smaller subarrays of specified size, preserving original element order and handlin…

Easy
2678

Number of Senior Citizens

Determine how many passengers are over 60 years old based on their compressed details in an array of strings.

Easy
2682

Find the Losers of the Circular Game

Simulate a ball-passing game around a circle using array scanning and hash lookup to find friends who never receive the …

Easy
2695

Array Wrapper

The Array Wrapper problem focuses on implementing a class that wraps an array to perform operations like addition or str…

Easy
2696

Minimum String Length After Removing Substrings

Determine the smallest string length after repeatedly removing AB or CD substrings using stack-based simulation techniqu…

Easy
2697

Lexicographically Smallest Palindrome

Given a string, make it a palindrome with the fewest operations, prioritizing lexicographically smallest result.

Easy
2703

Return Length of Arguments Passed

Determine the number of arguments passed to a function, practicing direct counting of parameters in real-time function c…

Easy
2704

To Be Or Not To Be

Implement a function 'expect' to help developers test values using 'toBe' and 'notToBe' methods.

Easy
2706

Buy Two Chocolates

Determine the leftover money after buying exactly two chocolates using a greedy selection and sum validation approach.

Easy
2710

Remove Trailing Zeros From a String

Remove trailing zeros from a string representing a positive integer number.

Easy
2715

Timeout Cancellation

Learn to implement timeout cancellation logic for function execution using a custom cancel function.

Easy
2716

Minimize String Length

Minimize String Length asks you to reduce a string by removing duplicates using a Hash Table strategy efficiently.

Easy
2717

Semi-Ordered Permutation

Find the minimum number of operations to convert a permutation into a semi-ordered permutation where 1 is first and n is…

Easy
2723

Add Two Promises

The problem 'Add Two Promises' involves adding the resolved values of two promises and returning the result.

Easy
2724

Sort By

Sort By requires sorting an array using a custom function, producing ascending order based on function outputs efficient…

Easy
2725

Interval Cancellation

Implement a cancellable function with repeated executions at fixed intervals before a cancellation time.

Easy
2726

Calculator with Method Chaining

Design a Calculator class that supports method chaining for mathematical operations like addition, subtraction, multipli…

Easy
2727

Is Object Empty

Determine if a given object or array is empty by checking its keys or length efficiently in interviews.

Easy
2729

Check if The Number is Fascinating

Determine if a 3-digit number is fascinating by checking if the concatenated result of n, 2*n, and 3*n contains all digi…

Easy
2733

Neither Minimum nor Maximum

Find a number in an array that is neither the minimum nor maximum value, or return -1 if no such number exists.

Easy
2739

Total Distance Traveled

Calculate the maximum distance a truck can travel using main and additional fuel tanks with controlled transfers.

Easy
2744

Find Maximum Number of String Pairs

Find the maximum number of pairs of distinct strings from an array where one string is the reverse of the other.

Easy
2748

Number of Beautiful Pairs

Count all index pairs in an array where the first digit of one number and last digit of another are coprime efficiently.

Easy
2760

Longest Even Odd Subarray With Threshold

Determine the length of the longest subarray where elements alternate even and odd while staying below a given threshold…

Easy
2765

Longest Alternating Subarray

Find the longest alternating subarray in a given array of integers.

Easy
2769

Find the Maximum Achievable Number

Determine the largest number achievable by repeatedly applying a simple math operation up to t times efficiently.

Easy
2778

Sum of Squares of Special Elements

Calculate the sum of squares of special elements in a 1-indexed array using index divisibility checks efficiently.

Easy
2784

Check if Array is Good

Determine if a given integer array is a permutation of base[n], containing 1 to n-1 once and n twice, using scanning and…

Easy
2788

Split Strings by Separator

Split Strings by Separator requires iterating through an array of strings and splitting each by a given separator charac…

Easy
2798

Number of Employees Who Met the Target

Determine how many employees reach the required work hours using a direct array-driven counting approach.

Easy
2806

Account Balance After Rounded Purchase

Given a purchase amount, calculate the account balance after rounding the purchase to the nearest multiple of 10 and ded…

Easy
2810

Faulty Keyboard

Simulate typing on a faulty keyboard where pressing 'i' reverses the string, requiring careful string manipulation track…

Easy
2815

Max Pair Sum in an Array

Find the maximum sum of two numbers in an array sharing the same largest digit using a hash-based scan efficiently.

Easy
2824

Count Pairs Whose Sum is Less than Target

This problem asks you to count all index pairs in an array whose sum is strictly less than a given target value efficien…

Easy
2828

Check if a String Is an Acronym of Words

Check if a string can be formed by concatenating the first letters of each word in a given list.

Easy
2833

Furthest Point From Origin

Determine the maximum distance from origin using string moves and counting underscores optimally for efficient calculati…

Easy
2839

Check if Strings Can be Made Equal With Operations I

Determine if two strings can be made equal by repeatedly swapping characters at any two indices in each string.

Easy
2843

Count Symmetric Integers

Count Symmetric Integers finds numbers where the sum of the first half of digits equals the sum of the second half withi…

Easy
2848

Points That Intersect With Cars

Count covered integer points by merging overlapping car intervals or marking visited positions on the number line.

Easy
2855

Minimum Right Shifts to Sort the Array

Determine the minimum number of right shifts to sort a distinct integer array or return -1 if impossible using array ana…

Easy
2859

Sum of Values at Indices With K Set Bits

Sum values in an array where the indices have exactly k set bits in binary representation.

Easy
2864

Maximum Odd Binary Number

Rearrange a binary string to form the largest odd binary number using a greedy approach and least significant bit valida…

Easy
2869

Minimum Operations to Collect Elements

Scan from the end, track seen values from 1 to k, and stop once every required number is collected.

Easy
2873

Maximum Value of an Ordered Triplet I

Find the maximum value of a triplet in an array where indices follow the order i < j < k.

Easy
2877

Create a DataFrame from List

Solve the problem of creating a DataFrame from a list of student data by using the pandas library.

Easy
2878

Get the Size of a DataFrame

Learn how to efficiently calculate the number of rows and columns in a DataFrame using Python pandas for interview succe…

Easy
2879

Display the First Three Rows

Solve a problem where you need to display the first three rows of a DataFrame in Python.

Easy
2880

Select Data

Learn to efficiently select specific rows and columns in a dataset using the Select Data core interview pattern for accu…

Easy
2881

Create a New Column

Create a New Column is a simple problem involving DataFrame manipulation, requiring the creation of a new column based o…

Easy
2882

Drop Duplicate Rows

This problem requires removing duplicate rows based on the email column and retaining only the first occurrence.

Easy
2883

Drop Missing Data

Remove rows with missing values from a dataset, focusing on the drop missing data pattern.

Easy
2884

Modify Columns

Learn how to efficiently modify a DataFrame column by applying a transformation to every value in a single pass.

Easy
2885

Rename Columns

This problem asks you to rename columns in a DataFrame to match a specified format using a built-in function.

Easy
2886

Change Data Type

Correct column data types in a DataFrame, focusing on converting float columns to integers efficiently and accurately.

Easy
2887

Fill Missing Data

Fill Missing Data is an easy-level problem that focuses on handling missing values in a dataset.

Easy
2888

Reshape Data: Concatenate

Concatenate two DataFrames vertically by stacking rows to produce a single combined DataFrame efficiently using pandas.

Easy
2889

Reshape Data: Pivot

Learn how to pivot data in a table so each row is a month and each city forms its own column efficiently.

Easy
2890

Reshape Data: Melt

Reshape the data so that each row represents sales data for a product across different quarters.

Easy
2891

Method Chaining

In Method Chaining, solve problems using sequential method calls with clean, readable code. Apply this to filter and sor…

Easy
2894

Divisible and Non-divisible Sums Difference

Compute the difference between sums of integers divisible and non-divisible by m using a direct arithmetic approach effi…

Easy
2899

Last Visited Integers

This problem involves finding the last visited integer for each -1 in a given array by simulating a stack-like behavior.

Easy
2900

Longest Unequal Adjacent Groups Subsequence I

Find the longest alternating subsequence in a string array based on a binary group array.

Easy
2903

Find Indices With Index and Value Difference I

Find two indices in an array where their difference in both index and value meets specified thresholds.

Easy
2908

Minimum Sum of Mountain Triplets I

Find the minimum sum of a mountain triplet in an array of integers, or return -1 if no valid triplet exists.

Easy
2913

Subarrays Distinct Element Sum of Squares I

Compute the sum of squares of distinct elements for all subarrays using array scanning with hash lookups efficiently.

Easy
2917

Find the K-or of an Array

Given an integer array nums and an integer k, find the K-or of nums where bits qualify based on the occurrence of 1s.

Easy
2923

Find Champion I

Find Champion I is an easy problem focusing on identifying the strongest team in a tournament using matrix-based compari…

Easy
2928

Distribute Candies Among Children I

Given two integers n and limit, find the number of ways to distribute n candies among 3 children, with no child receivin…

Easy
2932

Maximum Strong Pair XOR I

Find the maximum XOR of any strong pair in an integer array using array scanning and hash-based lookups efficiently.

Easy
2937

Make Three Strings Equal

Determine the minimum number of operations to make three strings equal by removing rightmost characters from one string …

Easy
2942

Find Words Containing Character

Identify all indices of words containing a specific character using array and string traversal techniques efficiently.

Easy
2946

Matrix Similarity After Cyclic Shifts

Determine if a matrix returns to its original state after performing cyclic row shifts k times using array and math patt…

Easy
2951

Find the Peaks

Identify all peaks in a mountain array using direct array enumeration and strict neighbor comparisons efficiently.

Easy
2956

Find Common Elements Between Two Arrays

Quickly find all numbers that appear in both arrays using scanning and hash lookup to handle duplicates efficiently.

Easy
2960

Count Tested Devices After Test Operations

Simulate testing devices based on battery percentages to determine how many pass the test operations in sequence.

Easy
2965

Find Missing and Repeated Values

Find the missing and repeated numbers in an n x n grid using array scanning and hash lookup.

Easy
2970

Count the Number of Incremovable Subarrays I

Count the number of incremovable subarrays in an array by removing them to create a strictly increasing sequence.

Easy
2974

Minimum Number Game

The Minimum Number Game involves simulating moves by Alice and Bob on an array, sorting elements and appending them to a…

Easy
2980

Check if Bitwise OR Has Trailing Zeros

Check if a bitwise OR of two or more numbers has trailing zeros in its binary representation.

Easy
2996

Smallest Missing Integer Greater Than Sequential Prefix Sum

Find the smallest missing integer greater than the sum of the longest sequential prefix in an array.

Easy
3000

Maximum Area of Longest Diagonal Rectangle

Find the rectangle with the longest diagonal in a 2D array and return its area, prioritizing maximum area on ties.

Easy
3005

Count Elements With Maximum Frequency

Count Elements With Maximum Frequency is solved by counting each value, tracking the highest count, and summing matching…

Easy
3010

Divide an Array Into Subarrays With Minimum Cost I

Divide an array into three contiguous subarrays with minimum cost by leveraging array and sorting principles.

Easy
3014

Minimum Number of Pushes to Type Word I

Calculate the minimum pushes to type a word using a remapped telephone keypad with greedy allocation of letters.

Easy
3019

Number of Changing Keys

Count how many times a user switches keys in a typed string, ignoring shift and caps lock variations in characters.

Easy
3024

Type of Triangle

Determine the type of triangle from a three-element array using side sums and equality checks efficiently in constant ti…

Easy
3028

Ant on the Boundary

Solve the problem of counting how often an ant returns to a boundary based on the steps described in the input array.

Easy
3033

Modify the Matrix

Modify the Matrix efficiently by replacing all -1 elements with the maximum in their column using array and matrix opera…

Easy
3038

Maximum Number of Operations With the Same Score I

Determine the maximum number of operations in an integer array where each operation must produce the same score.

Easy
3042

Count Prefix and Suffix Pairs I

Count all index pairs where one word is both a prefix and suffix of another, using efficient array and string checks.

Easy
3046

Split the Array

Determine if an even-length array can be split into two parts with all distinct elements using hash lookup scanning.

Easy
3065

Minimum Operations to Exceed Threshold Value I

Count how many numbers are below k, because each such value must be removed in Minimum Operations to Exceed Threshold Va…

Easy
3069

Distribute Elements Into Two Arrays I

Distribute elements from a distinct integer array into two subarrays using a sequential simulation strategy for optimal …

Easy
3074

Apple Redistribution into Boxes

Distribute packs of apples into boxes using a greedy strategy, minimizing the number of boxes selected efficiently and c…

Easy
3079

Find the Sum of Encrypted Integers

Compute the sum of encrypted integers by replacing each digit with the largest digit, combining array traversal with dig…

Easy
3083

Existence of a Substring in a String and Its Reverse

Check for any substring of length 2 in a string and its reverse using a hash table and string comparison.

Easy
3090

Maximum Length Substring With Two Occurrences

Find the maximum length substring where some substring occurs at least twice using a sliding window and hash mapping str…

Easy
3095

Shortest Subarray With OR at Least K I

Find the shortest non-empty subarray in nums whose bitwise OR reaches at least k using sliding window efficiently.

Easy
3099

Harshad Number

Given an integer, determine if it is a Harshad number by checking if it's divisible by the sum of its digits.

Easy
3105

Longest Strictly Increasing or Strictly Decreasing Subarray

Find the longest subarray in a given array that is either strictly increasing or strictly decreasing.

Easy
3110

Score of a String

Calculate the sum of absolute ASCII differences between adjacent characters to score any given string efficiently.

Easy
3114

Latest Time You Can Obtain After Replacing Characters

Given a time string with "?" characters, replace them to form the latest valid 12-hour time.

Easy
3120

Count the Number of Special Characters I

Count the number of special characters in a given string using hash tables and string manipulation.

Easy
3127

Make a Square with the Same Color

Determine if a 3x3 grid can form a 2x2 square of the same color by changing at most one cell efficiently.

Easy
3131

Find the Integer Added to Array I

Find the integer added to nums1 to make it equal to nums2 using an array-driven strategy.

Easy
3136

Valid Word

Determine if a given string qualifies as a valid word using a string-driven solution pattern with explicit character rul…

Easy
3142

Check if Grid Satisfies Conditions

Check if a grid satisfies given conditions by analyzing array and matrix structure with specific checks on values.

Easy
3146

Permutation Difference between Two Strings

Compute the total index difference between two strings by mapping characters and summing their positional distances effi…

Easy
3151

Special Array I

Determine if an array is special by checking alternating parity for every adjacent pair in linear time.

Easy
3158

Find the XOR of Numbers Which Appear Twice

Find the XOR of numbers appearing twice by scanning the array and using a hash table for efficient tracking and combinat…

Easy
3162

Find the Number of Good Pairs I

Count all good pairs where an element in nums1 is divisible by a scaled element in nums2 using efficient array scanning.

Easy
3168

Minimum Number of Chairs in a Waiting Room

Calculate the minimum number of chairs needed in a waiting room using string simulation and event tracking efficiently.

Easy
3174

Clear Digits

Remove all digits from a given string by applying a repeated operation to form the final string without digits.

Easy
3178

Find the Child Who Has the Ball After K Seconds

Find the child who holds the ball after k seconds of passing in a queue, considering reversals at both ends.

Easy
3184

Count Pairs That Form a Complete Day I

Count all pairs in an array where their sum forms a complete day using hash-based counting for efficiency.

Easy
3190

Find Minimum Operations to Make All Elements Divisible by Three

Find the minimum number of operations to make all elements in an array divisible by three.

Easy
3194

Minimum Average of Smallest and Largest Elements

Solve the Minimum Average of Smallest and Largest Elements problem using two-pointer scanning to track averages effectiv…

Easy
3200

Maximum Height of a Triangle

Find the maximum height of a triangle that can be formed using red and blue balls under given constraints.

Easy
3206

Alternating Groups I

Count all alternating groups in a circular array by tracking tiles with distinct neighbors efficiently using sliding win…

Easy
3210

Find the Encrypted String

In this problem, you need to encrypt a string by shifting each character's position based on a given integer value.

Easy
3216

Lexicographically Smallest String After a Swap

Lexicographically Smallest String After a Swap involves finding the smallest string after swapping adjacent digits with …

Easy
3222

Find the Winning Player in Coin Game

In this game between Alice and Bob, players must pick coins summing to 115. Alice starts, and the goal is to determine t…

Easy
3226

Number of Bit Changes to Make Two Integers Equal

Find the number of bit changes to make two integers equal using bit manipulation techniques.

Easy
3232

Find if Digit Game Can Be Won

Determine if Alice can guarantee a win in a game by selectively summing single or double-digit numbers from an array.

Easy
3238

Find the Number of Winning Players

Find how many players in a game win by picking more balls of a single color than their index position.

Easy
3242

Design Neighbor Sum Service

Design a service that computes sums for adjacent and diagonal elements in a 2D grid.

Easy
3248

Snake in Matrix

Solve the Snake in Matrix problem by simulating the snake's movement in a grid based on a series of directional commands…

Easy
3258

Count Substrings That Satisfy K-Constraint I

Count all substrings in a binary string that meet a given k-constraint using an efficient sliding window approach.

Easy
3264

Final Array State After K Multiplication Operations I

Solve the problem of determining the final state of an array after multiple multiplication operations using a priority q…

Easy
3270

Find the Key of the Numbers

Determine the four-digit key from three given numbers using a precise math-driven approach for exact digit alignment.

Easy
3274

Check if Two Chessboard Squares Have the Same Color

Determine if two chessboard squares share the same color using coordinate math and simple string manipulation for quick …

Easy
3280

Convert Date to Binary

Convert a given Gregorian date string to its binary format by transforming year, month, and day individually without lea…

Easy
3285

Find Indices of Stable Mountains

Find the indices of stable mountains in an array of mountain heights based on a threshold.

Easy
3289

The Two Sneaky Numbers of Digitville

Find the two numbers that appear twice in a list of integers from 0 to n-1 using array scanning plus hash lookup efficie…

Easy
3300

Minimum Element After Replacement With Digit Sum

Replace each number with its digit sum and return the smallest resulting value, using array plus math techniques efficie…

Easy
3304

Find the K-th Character in String Game I

Find the K-th character in a progressively built string using math and bit manipulation efficiently.

Easy
3314

Construct the Minimum Bitwise Array I

Learn how to construct an array minimizing each element while matching given primes using bitwise operations efficiently…

Easy
3318

Find X-Sum of All K-Long Subarrays I

Compute the x-sum of every subarray of length k efficiently using array scanning combined with hash lookup techniques.

Easy
3330

Find the Original Typed String I

Determine the length of the original string Alice intended to type by analyzing repeated characters and clumsy key press…

Easy
3340

Check Balanced String

Determine if a numeric string is balanced by comparing sums of digits at even and odd positions efficiently.

Easy
3345

Smallest Divisible Digit Product I

Find the smallest number greater than or equal to n whose digit product is divisible by t.

Easy
3349

Adjacent Increasing Subarrays Detection I

Check if an array contains two adjacent strictly increasing subarrays of length k using an array-driven approach efficie…

Easy
3354

Make Array Elements Equal to Zero

Learn how to transform an integer array to zeros using simulation and directional selection efficiently and reliably.

Easy
3360

Stone Removal Game

Alice and Bob play a game of stone removal. Alice goes first, and the winner is the player who can make a move until the…

Easy
3364

Minimum Positive Sum Subarray

Find the minimum sum of any subarray of size between l and r with a positive total using efficient sliding window logic.

Easy
3370

Smallest Number With All Set Bits

Find the smallest number greater than or equal to n with all set bits in its binary representation.

Easy
3375

Minimum Operations to Make Array Values Equal to K

Find the minimum operations to convert an array to all values equal k using array scanning and hash lookup efficiently.

Easy
3379

Transformed Array

Simulate operations on a circular array to return a transformed result array following specific rules.

Easy
3386

Button with Longest Push Time

Determine which button a child pressed the longest using an array-driven strategy to track time differences efficiently.

Easy
3392

Count Subarrays of Length Three With a Condition

Determine how many subarrays of length three satisfy a sum condition on their first and third elements in an array.

Easy
3396

Minimum Number of Operations to Make Elements in Array Distinct

Find the minimum number of operations to make all elements of an array distinct.

Easy
3402

Minimum Operations to Make Columns Strictly Increasing

Calculate the minimum increments to make each column of a matrix strictly increasing using a greedy invariant approach.

Easy
3407

Substring Matching Pattern

Determine if a pattern containing a single wildcard can match any substring of a given string efficiently.

Easy
3411

Maximum Subarray With Equal Products

This problem involves finding the longest subarray where the product equals the LCM multiplied by the GCD, leveraging a …

Easy
3417

Zigzag Grid Traversal With Skip

Traverse a 2D grid in a zigzag pattern while skipping alternate cells, focusing on array and matrix manipulation challen…

Easy
3423

Maximum Difference Between Adjacent Elements in a Circular Array

Find the maximum absolute difference between adjacent elements in a circular array using a straightforward array-driven …

Easy
3427

Sum of Variable Length Subarrays

Calculate the total sum of all elements in subarrays defined for each index in an array, using the array plus prefix sum…

Easy
3432

Count Partitions with Even Sum Difference

Count the number of partitions with an even sum difference from an array of integers.

Easy
3438

Find Valid Pair of Adjacent Digits in String

Identify the first valid adjacent digit pair in a string where each digit appears exactly as many times as its numeric v…

Easy
3442

Maximum Difference Between Even and Odd Frequency I

Find the maximum difference between the frequency of characters in a string with odd and even frequencies.

Easy
3452

Sum of Good Numbers

The problem asks for the sum of all good numbers in an array based on specific conditions of neighboring elements.

Easy
3456

Find Special Substring of Length K

Check efficiently if a string contains a consecutive sequence of length k where all characters match exactly one distinc…

Easy
3461

Check If Digits Are Equal in String After Operations I

Simulate repeated adjacent digit sums modulo 10 until two digits remain, then check whether those final digits match.

Easy
3467

Transform Array by Parity

Transform an array by sorting even numbers first, followed by odd numbers.

Easy
3471

Find the Largest Almost Missing Integer

Find the largest almost missing integer in an array where it appears in exactly one subarray of size k.

Easy
3477

Fruits Into Baskets II

Determine the number of fruit types that remain unplaced after all allocations in the "Fruits Into Baskets II" problem.

Easy
3483

Unique 3-Digit Even Numbers

Given an array of digits, find how many distinct 3-digit even numbers can be formed without repetition of digits and no …

Easy
3487

Maximum Unique Subarray Sum After Deletion

Maximize the sum of a subarray after performing deletions, ensuring elements remain unique.

Easy
3492

Maximum Containers on a Ship

Determine the maximum number of containers that can be loaded onto a ship's deck without exceeding weight limits.

Easy
3498

Reverse Degree of a String

Calculate the reverse degree of a string by simulating operations on its characters based on their positions in the alph…

Easy
3502

Minimum Cost to Reach Every Position

Calculate the minimum swap costs to reach each position in a line using a precise array-driven strategy for efficiency.

Easy
3507

Minimum Pair Removal to Sort Array I

This problem asks for the minimum number of operations to make an array non-decreasing by removing pairs of elements.

Easy
3512

Minimum Operations to Make Array Sum Divisible by K

This problem asks you to find the minimum operations to make the sum of an array divisible by a given integer k.

Easy
3516

Find Closest Person

Determine which of two people reaches a third person first using a simple math-driven distance comparison strategy.

Easy
3536

Maximum Product of Two Digits

Find the highest product obtainable from any two digits of a given positive integer using math and sorting techniques ef…

Easy
3541

Find Most Frequent Vowel and Consonant

Given a string, calculate the sum of the most frequent vowel and consonant frequencies.

Easy
3545

Minimum Deletions for At Most K Distinct Characters

You need to delete characters in a string to reduce its distinct characters to at most k.

Easy
3550

Smallest Index With Digit Sum Equal to Index

Find the smallest index in an array where the sum of the digits equals the index.

Easy
3560

Find Minimum Log Transportation Cost

Calculate the minimum cost to transport two logs using a math-driven strategy considering cutting costs and truck limits…

Easy
3582

Generate Tag for Video Caption

Transform a video caption into a valid hashtag by simulating capitalization rules and truncation for long words efficien…

Easy
3591

Check if Any Element Has Prime Frequency

Check if any element in the array has a prime frequency count, leveraging array scanning and hash table lookup.

Easy
3602

Hexadecimal and Hexatrigesimal Conversion

Solve Hexadecimal and Hexatrigesimal Conversion by converting n squared to base 16 and n cubed to base 36, then joining …

Easy
3606

Coupon Code Validator

The Coupon Code Validator problem requires filtering and sorting coupons based on specific criteria for validity.

Easy
3622

Check Divisibility by Digit Sum and Product

Determine if a positive integer is divisible by the sum of its digits plus their product using a math-driven strategy.

Easy
3633

Earliest Finish Time for Land and Water Rides I

Find the earliest time a tourist can finish one land and one water ride in a theme park.

Easy
3637

Trionic Array I

Determine if an integer array contains indices forming a trionic sequence for efficient pattern detection in interviews.

Easy

Top Topics In This Track

route

Guided Practice Path

AI recommends problems by your level and tracks your progress.

Start Guided Patharrow_forward
Easy LeetCode Problems