DEV Community

#LEETCODE Series' Articles

Back to MD ARIFUL HAQUE's Series
623. Add One Row to Tree
Cover image for 623. Add One Row to Tree

623. Add One Row to Tree

Comments
4 min read
988. Smallest String Starting From Leaf
Cover image for 988. Smallest String Starting From Leaf

988. Smallest String Starting From Leaf

2
Comments
2 min read
463. Island Perimeter
Cover image for 463. Island Perimeter

463. Island Perimeter

1
Comments
3 min read
200. Number of Islands
Cover image for 200. Number of Islands

200. Number of Islands

1
Comments
3 min read
1992. Find All Groups of Farmland
Cover image for 1992. Find All Groups of Farmland

1992. Find All Groups of Farmland

Comments
3 min read
752. Open the Lock
Cover image for 752. Open the Lock

752. Open the Lock

Comments
4 min read
1971. Find if Path Exists in Graph
Cover image for 1971. Find if Path Exists in Graph

1971. Find if Path Exists in Graph

1
Comments
2 min read
310. Minimum Height Trees
Cover image for 310. Minimum Height Trees

310. Minimum Height Trees

1
Comments
3 min read
1137. N-th Tribonacci Number
Cover image for 1137. N-th Tribonacci Number

1137. N-th Tribonacci Number

Comments
1 min read
2370. Longest Ideal Subsequence
Cover image for 2370. Longest Ideal Subsequence

2370. Longest Ideal Subsequence

Comments
2 min read
1289. Minimum Falling Path Sum II
Cover image for 1289. Minimum Falling Path Sum II

1289. Minimum Falling Path Sum II

Comments
2 min read
514. Freedom Trail
Cover image for 514. Freedom Trail

514. Freedom Trail

1
Comments
4 min read
834. Sum of Distances in Tree
Cover image for 834. Sum of Distances in Tree

834. Sum of Distances in Tree

Comments
3 min read
1700. Number of Students Unable to Eat Lunch
Cover image for 1700. Number of Students Unable to Eat Lunch

1700. Number of Students Unable to Eat Lunch

Comments
2 min read
2073. Time Needed to Buy Tickets
Cover image for 2073. Time Needed to Buy Tickets

2073. Time Needed to Buy Tickets

Comments
2 min read
2997. Minimum Number of Operations to Make Array XOR Equal to K
Cover image for 2997. Minimum Number of Operations to Make Array XOR Equal to K

2997. Minimum Number of Operations to Make Array XOR Equal to K

Comments
2 min read
1614. Maximum Nesting Depth of the Parentheses
Cover image for 1614. Maximum Nesting Depth of the Parentheses

1614. Maximum Nesting Depth of the Parentheses

Comments
2 min read
1544. Make The String Great
Cover image for 1544. Make The String Great

1544. Make The String Great

Comments
2 min read
1915. Number of Wonderful Substrings
Cover image for 1915. Number of Wonderful Substrings

1915. Number of Wonderful Substrings

Comments
2 min read
1249. Minimum Remove to Make Valid Parentheses
Cover image for 1249. Minimum Remove to Make Valid Parentheses

1249. Minimum Remove to Make Valid Parentheses

Comments
2 min read
950. Reveal Cards In Increasing Order
Cover image for 950. Reveal Cards In Increasing Order

950. Reveal Cards In Increasing Order

Comments
2 min read
678. Valid Parenthesis String
Cover image for 678. Valid Parenthesis String

678. Valid Parenthesis String

Comments
3 min read
2000. Reverse Prefix of Word
Cover image for 2000. Reverse Prefix of Word

2000. Reverse Prefix of Word

Comments
2 min read
79. Word Search
Cover image for 79. Word Search

79. Word Search

1
Comments
2 min read
129. Sum Root to Leaf Numbers
Cover image for 129. Sum Root to Leaf Numbers

129. Sum Root to Leaf Numbers

Comments
3 min read
2441. Largest Positive Integer That Exists With Its Negative
Cover image for 2441. Largest Positive Integer That Exists With Its Negative

2441. Largest Positive Integer That Exists With Its Negative

Comments
1 min read
58. Length of Last Word
Cover image for 58. Length of Last Word

58. Length of Last Word

Comments
2 min read
205. Isomorphic Strings
Cover image for 205. Isomorphic Strings

205. Isomorphic Strings

Comments
2 min read
165. Compare Version Numbers
Cover image for 165. Compare Version Numbers

165. Compare Version Numbers

Comments
3 min read
402. Remove K Digits
Cover image for 402. Remove K Digits

402. Remove K Digits

Comments
3 min read
42. Trapping Rain Water
Cover image for 42. Trapping Rain Water

42. Trapping Rain Water

Comments
1 min read
881. Boats to Save People
Cover image for 881. Boats to Save People

881. Boats to Save People

Comments
3 min read
237. Delete Node in a Linked List
Cover image for 237. Delete Node in a Linked List

237. Delete Node in a Linked List

Comments
3 min read
85. Maximal Rectangle
Cover image for 85. Maximal Rectangle

85. Maximal Rectangle

1
Comments
3 min read
404. Sum of Left Leaves
Cover image for 404. Sum of Left Leaves

404. Sum of Left Leaves

Comments
3 min read
2487. Remove Nodes From Linked List
Cover image for 2487. Remove Nodes From Linked List

2487. Remove Nodes From Linked List

Comments
1 min read
2816. Double a Number Represented as a Linked List
Cover image for 2816. Double a Number Represented as a Linked List

2816. Double a Number Represented as a Linked List

Comments
2 min read
445. Add Two Numbers II
Cover image for 445. Add Two Numbers II

445. Add Two Numbers II

Comments
3 min read
506. Relative Ranks
Cover image for 506. Relative Ranks

506. Relative Ranks

Comments
3 min read
1. Two Sum
Cover image for 1. Two Sum

1. Two Sum

Comments
2 min read
3075. Maximize Happiness of Selected Children
Cover image for 3075. Maximize Happiness of Selected Children

3075. Maximize Happiness of Selected Children

1
Comments
2 min read
2. Add Two Numbers
Cover image for 2. Add Two Numbers

2. Add Two Numbers

Comments
3 min read
786. K-th Smallest Prime Fraction
Cover image for 786. K-th Smallest Prime Fraction

786. K-th Smallest Prime Fraction

Comments
3 min read
3. Longest Substring Without Repeating Characters
Cover image for 3. Longest Substring Without Repeating Characters

3. Longest Substring Without Repeating Characters

1
Comments
3 min read
3123. Find Edges in Shortest Paths
Cover image for 3123. Find Edges in Shortest Paths

3123. Find Edges in Shortest Paths

2
Comments
2 min read
3122. Minimum Number of Operations to Satisfy Conditions
Cover image for 3122. Minimum Number of Operations to Satisfy Conditions

3122. Minimum Number of Operations to Satisfy Conditions

Comments
2 min read
3121. Count the Number of Special Characters II
Cover image for 3121. Count the Number of Special Characters II

3121. Count the Number of Special Characters II

Comments
1 min read
3113. Find the Number of Subarrays Where Boundary Elements Are Maximum
Cover image for 3113. Find the Number of Subarrays Where Boundary Elements Are Maximum

3113. Find the Number of Subarrays Where Boundary Elements Are Maximum

Comments
3 min read
2570. Merge Two 2D Arrays by Summing Values solution
Cover image for 2570. Merge Two 2D Arrays by Summing Values solution

2570. Merge Two 2D Arrays by Summing Values solution

Comments
2 min read
2530. Maximal Score After Applying K Operations
Cover image for 2530. Maximal Score After Applying K Operations

2530. Maximal Score After Applying K Operations

Comments
4 min read
857. Minimum Cost to Hire K Workers
Cover image for 857. Minimum Cost to Hire K Workers

857. Minimum Cost to Hire K Workers

Comments
4 min read
4. Median of Two Sorted Arrays
Cover image for 4. Median of Two Sorted Arrays

4. Median of Two Sorted Arrays

Comments
2 min read
2373. Largest Local Values in a Matrix
Cover image for 2373. Largest Local Values in a Matrix

2373. Largest Local Values in a Matrix

Comments
2 min read
17. Letter Combinations of a Phone Number
Cover image for 17. Letter Combinations of a Phone Number

17. Letter Combinations of a Phone Number

Comments
1 min read
861. Score After Flipping Matrix
Cover image for 861. Score After Flipping Matrix

861. Score After Flipping Matrix

Comments
3 min read
1219. Path with Maximum Gold
Cover image for 1219. Path with Maximum Gold

1219. Path with Maximum Gold

Comments
2 min read
2812. Find the Safest Path in a Grid
Cover image for 2812. Find the Safest Path in a Grid

2812. Find the Safest Path in a Grid

1
Comments
3 min read
2331. Evaluate Boolean Binary Tree
Cover image for 2331. Evaluate Boolean Binary Tree

2331. Evaluate Boolean Binary Tree

1
Comments
2 min read
1325. Delete Leaves With a Given Value
Cover image for 1325. Delete Leaves With a Given Value

1325. Delete Leaves With a Given Value

Comments
2 min read
979. Distribute Coins in Binary Tree
Cover image for 979. Distribute Coins in Binary Tree

979. Distribute Coins in Binary Tree

Comments
2 min read
3068. Find the Maximum Sum of Node Values
Cover image for 3068. Find the Maximum Sum of Node Values

3068. Find the Maximum Sum of Node Values

2
Comments 1
3 min read
1863. Sum of All Subset XOR Totals
Cover image for 1863. Sum of All Subset XOR Totals

1863. Sum of All Subset XOR Totals

Comments
2 min read
78. Subsets
Cover image for 78. Subsets

78. Subsets

Comments
1 min read
131. Palindrome Partitioning
Cover image for 131. Palindrome Partitioning

131. Palindrome Partitioning

Comments
2 min read
2597. The Number of Beautiful Subsets
Cover image for 2597. The Number of Beautiful Subsets

2597. The Number of Beautiful Subsets

1
Comments
2 min read
1255. Maximum Score Words Formed by Letters
Cover image for 1255. Maximum Score Words Formed by Letters

1255. Maximum Score Words Formed by Letters

Comments
2 min read
140. Word Break II
Cover image for 140. Word Break II

140. Word Break II

Comments
2 min read
552. Student Attendance Record II
Cover image for 552. Student Attendance Record II

552. Student Attendance Record II

1
Comments
3 min read
1608. Special Array With X Elements Greater Than or Equal X
Cover image for 1608. Special Array With X Elements Greater Than or Equal X

1608. Special Array With X Elements Greater Than or Equal X

Comments
2 min read
1208. Get Equal Substrings Within Budget
Cover image for 1208. Get Equal Substrings Within Budget

1208. Get Equal Substrings Within Budget

Comments
2 min read
1404. Number of Steps to Reduce a Number in Binary Representation to One
Cover image for 1404. Number of Steps to Reduce a Number in Binary Representation to One

1404. Number of Steps to Reduce a Number in Binary Representation to One

2
Comments
2 min read
1442. Count Triplets That Can Form Two Arrays of Equal XOR
Cover image for 1442. Count Triplets That Can Form Two Arrays of Equal XOR

1442. Count Triplets That Can Form Two Arrays of Equal XOR

Comments
1 min read
260. Single Number III
Cover image for 260. Single Number III

260. Single Number III

1
Comments
1 min read
3110. Score of a String
Cover image for 3110. Score of a String

3110. Score of a String

2
Comments
1 min read
344. Reverse String
Cover image for 344. Reverse String

344. Reverse String

1
Comments
2 min read
2486. Append Characters to String to Make Subsequence
Cover image for 2486. Append Characters to String to Make Subsequence

2486. Append Characters to String to Make Subsequence

Comments
2 min read
409. Longest Palindrome
Cover image for 409. Longest Palindrome

409. Longest Palindrome

Comments
2 min read
1002. Find Common Characters
Cover image for 1002. Find Common Characters

1002. Find Common Characters

Comments
1 min read
846. Hand of Straights
Cover image for 846. Hand of Straights

846. Hand of Straights

Comments
4 min read
648. Replace Words
Cover image for 648. Replace Words

648. Replace Words

1
Comments
4 min read
523. Continuous Subarray Sum
Cover image for 523. Continuous Subarray Sum

523. Continuous Subarray Sum

1
Comments
3 min read
974. Subarray Sums Divisible by K
Cover image for 974. Subarray Sums Divisible by K

974. Subarray Sums Divisible by K

Comments
1 min read
1051. Height Checker
Cover image for 1051. Height Checker

1051. Height Checker

1
Comments
2 min read
1122. Relative Sort Array
Cover image for 1122. Relative Sort Array

1122. Relative Sort Array

1
Comments
2 min read
75. Sort Colors
Cover image for 75. Sort Colors

75. Sort Colors

Comments
3 min read
2037. Minimum Number of Moves to Seat Everyone
Cover image for 2037. Minimum Number of Moves to Seat Everyone

2037. Minimum Number of Moves to Seat Everyone

Comments
2 min read
945. Minimum Increment to Make Array Unique
Cover image for 945. Minimum Increment to Make Array Unique

945. Minimum Increment to Make Array Unique

Comments
1 min read
502. IPO
Cover image for 502. IPO

502. IPO

Comments
3 min read
330. Patching Array
Cover image for 330. Patching Array

330. Patching Array

Comments
3 min read
633. Sum of Square Numbers
Cover image for 633. Sum of Square Numbers

633. Sum of Square Numbers

Comments
2 min read
826. Most Profit Assigning Work
Cover image for 826. Most Profit Assigning Work

826. Most Profit Assigning Work

Comments
3 min read
1482. Minimum Number of Days to Make m Bouquets
Cover image for 1482. Minimum Number of Days to Make m Bouquets

1482. Minimum Number of Days to Make m Bouquets

1
Comments
2 min read
1552. Magnetic Force Between Two Balls
Cover image for 1552. Magnetic Force Between Two Balls

1552. Magnetic Force Between Two Balls

2
Comments
2 min read
1052. Grumpy Bookstore Owner
Cover image for 1052. Grumpy Bookstore Owner

1052. Grumpy Bookstore Owner

2
Comments
2 min read
1248. Count Number of Nice Subarrays
Cover image for 1248. Count Number of Nice Subarrays

1248. Count Number of Nice Subarrays

2
Comments
1 min read
1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
Cover image for 1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit

1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit

1
Comments
2 min read
995. Minimum Number of K Consecutive Bit Flips
Cover image for 995. Minimum Number of K Consecutive Bit Flips

995. Minimum Number of K Consecutive Bit Flips

3
Comments
2 min read
1038. Binary Search Tree to Greater Sum Tree
Cover image for 1038. Binary Search Tree to Greater Sum Tree

1038. Binary Search Tree to Greater Sum Tree

Comments
2 min read
1382. Balance a Binary Search Tree

1382. Balance a Binary Search Tree

Comments
2 min read
1791. Find Center of Star Graph
Cover image for 1791. Find Center of Star Graph

1791. Find Center of Star Graph

Comments
2 min read
2285. Maximum Total Importance of Roads
Cover image for 2285. Maximum Total Importance of Roads

2285. Maximum Total Importance of Roads

Comments
2 min read
2192. All Ancestors of a Node in a Directed Acyclic Graph
Cover image for 2192. All Ancestors of a Node in a Directed Acyclic Graph

2192. All Ancestors of a Node in a Directed Acyclic Graph

Comments
3 min read
1579. Remove Max Number of Edges to Keep Graph Fully Traversable
Cover image for 1579. Remove Max Number of Edges to Keep Graph Fully Traversable

1579. Remove Max Number of Edges to Keep Graph Fully Traversable

Comments
3 min read
1550. Three Consecutive Odds
Cover image for 1550. Three Consecutive Odds

1550. Three Consecutive Odds

Comments 1
1 min read
350. Intersection of Two Arrays II
Cover image for 350. Intersection of Two Arrays II

350. Intersection of Two Arrays II

1
Comments
2 min read
1509. Minimum Difference Between Largest and Smallest Value in Three Moves
Cover image for 1509. Minimum Difference Between Largest and Smallest Value in Three Moves

1509. Minimum Difference Between Largest and Smallest Value in Three Moves

2
Comments
2 min read
2181. Merge Nodes in Between Zeros
Cover image for 2181. Merge Nodes in Between Zeros

2181. Merge Nodes in Between Zeros

1
Comments
2 min read
2058. Find the Minimum and Maximum Number of Nodes Between Critical Points
Cover image for 2058. Find the Minimum and Maximum Number of Nodes Between Critical Points

2058. Find the Minimum and Maximum Number of Nodes Between Critical Points

1
Comments
3 min read
2582. Pass the Pillow
Cover image for 2582. Pass the Pillow

2582. Pass the Pillow

1
Comments
2 min read
1518. Water Bottles
Cover image for 1518. Water Bottles

1518. Water Bottles

1
Comments
2 min read
1823. Find the Winner of the Circular Game
Cover image for 1823. Find the Winner of the Circular Game

1823. Find the Winner of the Circular Game

1
Comments
2 min read
1701. Average Waiting Time
Cover image for 1701. Average Waiting Time

1701. Average Waiting Time

1
Comments
3 min read
1598. Crawler Log Folder
Cover image for 1598. Crawler Log Folder

1598. Crawler Log Folder

2
Comments
2 min read
1190. Reverse Substrings Between Each Pair of Parentheses
Cover image for 1190. Reverse Substrings Between Each Pair of Parentheses

1190. Reverse Substrings Between Each Pair of Parentheses

3
Comments
2 min read
1717. Maximum Score From Removing Substrings
Cover image for 1717. Maximum Score From Removing Substrings

1717. Maximum Score From Removing Substrings

1
Comments
3 min read
2751. Robot Collisions
Cover image for 2751. Robot Collisions

2751. Robot Collisions

3
Comments
4 min read
726. Number of Atoms
Cover image for 726. Number of Atoms

726. Number of Atoms

1
Comments
3 min read
2196. Create Binary Tree From Descriptions
Cover image for 2196. Create Binary Tree From Descriptions

2196. Create Binary Tree From Descriptions

2
Comments
3 min read
2096. Step-By-Step Directions From a Binary Tree Node to Another
Cover image for 2096. Step-By-Step Directions From a Binary Tree Node to Another

2096. Step-By-Step Directions From a Binary Tree Node to Another

1
Comments
3 min read
1110. Delete Nodes And Return Forest
Cover image for 1110. Delete Nodes And Return Forest

1110. Delete Nodes And Return Forest

1
Comments
2 min read
1636. Sort Array by Increasing Frequency
Cover image for 1636. Sort Array by Increasing Frequency

1636. Sort Array by Increasing Frequency

2
Comments
2 min read
1530. Number of Good Leaf Nodes Pairs
Cover image for 1530. Number of Good Leaf Nodes Pairs

1530. Number of Good Leaf Nodes Pairs

2
Comments
3 min read
2191. Sort the Jumbled Numbers
Cover image for 2191. Sort the Jumbled Numbers

2191. Sort the Jumbled Numbers

2
Comments
3 min read
1380. Lucky Numbers in a Matrix
Cover image for 1380. Lucky Numbers in a Matrix

1380. Lucky Numbers in a Matrix

2
Comments
3 min read
1605. Find Valid Matrix Given Row and Column Sums
Cover image for 1605. Find Valid Matrix Given Row and Column Sums

1605. Find Valid Matrix Given Row and Column Sums

3
Comments
3 min read
2418. Sort the People
Cover image for 2418. Sort the People

2418. Sort the People

2
Comments
2 min read
2392. Build a Matrix With Conditions
Cover image for 2392. Build a Matrix With Conditions

2392. Build a Matrix With Conditions

2
Comments
4 min read
912. Sort an Array
Cover image for 912. Sort an Array

912. Sort an Array

2
Comments
187 min read
1334. Find the City With the Smallest Number of Neighbors at a Threshold Distance
Cover image for 1334. Find the City With the Smallest Number of Neighbors at a Threshold Distance

1334. Find the City With the Smallest Number of Neighbors at a Threshold Distance

3
Comments
3 min read
2976. Minimum Cost to Convert String I
Cover image for 2976. Minimum Cost to Convert String I

2976. Minimum Cost to Convert String I

1
Comments
4 min read
2045. Second Minimum Time to Reach Destination
Cover image for 2045. Second Minimum Time to Reach Destination

2045. Second Minimum Time to Reach Destination

2
Comments
4 min read
1395. Count Number of Teams
Cover image for 1395. Count Number of Teams

1395. Count Number of Teams

2
Comments
7 min read
1653. Minimum Deletions to Make String Balanced
Cover image for 1653. Minimum Deletions to Make String Balanced

1653. Minimum Deletions to Make String Balanced

1
Comments
2 min read
1105. Filling Bookcase Shelves
Cover image for 1105. Filling Bookcase Shelves

1105. Filling Bookcase Shelves

3
Comments 1
3 min read
2678. Number of Senior Citizens
Cover image for 2678. Number of Senior Citizens

2678. Number of Senior Citizens

1
Comments
3 min read
2134 Minimum Swaps to Group All 1's Together II
Cover image for 2134 Minimum Swaps to Group All 1's Together II

2134 Minimum Swaps to Group All 1's Together II

2
Comments
3 min read
1460. Make Two Arrays Equal by Reversing Subarrays
Cover image for 1460. Make Two Arrays Equal by Reversing Subarrays

1460. Make Two Arrays Equal by Reversing Subarrays

Comments
3 min read
1508. Range Sum of Sorted Subarray Sums
Cover image for 1508. Range Sum of Sorted Subarray Sums

1508. Range Sum of Sorted Subarray Sums

Comments
3 min read
2053. Kth Distinct String in an Array
Cover image for 2053. Kth Distinct String in an Array

2053. Kth Distinct String in an Array

Comments
3 min read
3016. Minimum Number of Pushes to Type Word II
Cover image for 3016. Minimum Number of Pushes to Type Word II

3016. Minimum Number of Pushes to Type Word II

Comments
4 min read
273. Integer to English Words
Cover image for 273. Integer to English Words

273. Integer to English Words

Comments
2 min read
885. Spiral Matrix III
Cover image for 885. Spiral Matrix III

885. Spiral Matrix III

1
Comments
3 min read
840. Magic Squares In Grid
Cover image for 840. Magic Squares In Grid

840. Magic Squares In Grid

Comments
2 min read
959. Regions Cut By Slashes
Cover image for 959. Regions Cut By Slashes

959. Regions Cut By Slashes

Comments
2 min read
1568. Minimum Number of Days to Disconnect Island
Cover image for 1568. Minimum Number of Days to Disconnect Island

1568. Minimum Number of Days to Disconnect Island

Comments
3 min read
703. Kth Largest Element in a Stream
Cover image for 703. Kth Largest Element in a Stream

703. Kth Largest Element in a Stream

Comments
148 min read
40. Combination Sum II
Cover image for 40. Combination Sum II

40. Combination Sum II

Comments
2 min read
719. Find K-th Smallest Pair Distance
Cover image for 719. Find K-th Smallest Pair Distance

719. Find K-th Smallest Pair Distance

Comments
3 min read
860. Lemonade Change
Cover image for 860. Lemonade Change

860. Lemonade Change

Comments
3 min read
624. Maximum Distance in Arrays
Cover image for 624. Maximum Distance in Arrays

624. Maximum Distance in Arrays

Comments
2 min read
1937. Maximum Number of Points with Cost
Cover image for 1937. Maximum Number of Points with Cost

1937. Maximum Number of Points with Cost

Comments
4 min read
650. 2 Keys Keyboard
Cover image for 650. 2 Keys Keyboard

650. 2 Keys Keyboard

1
Comments
3 min read
1140. Stone Game II
Cover image for 1140. Stone Game II

1140. Stone Game II

1
Comments
3 min read
664. Strange Printer
Cover image for 664. Strange Printer

664. Strange Printer

Comments
3 min read
476. Number Complement
Cover image for 476. Number Complement

476. Number Complement

Comments
2 min read
592. Fraction Addition and Subtraction
Cover image for 592. Fraction Addition and Subtraction

592. Fraction Addition and Subtraction

1
Comments
2 min read
564. Find the Closest Palindrome
Cover image for 564. Find the Closest Palindrome

564. Find the Closest Palindrome

Comments
2 min read
145. Binary Tree Postorder Traversal
Cover image for 145. Binary Tree Postorder Traversal

145. Binary Tree Postorder Traversal

Comments
2 min read
590. N-ary Tree Postorder Traversa
Cover image for 590. N-ary Tree Postorder Traversa

590. N-ary Tree Postorder Traversa

Comments
3 min read
1514. Path with Maximum Probability
Cover image for 1514. Path with Maximum Probability

1514. Path with Maximum Probability

3
Comments
3 min read
1905. Count Sub Islands
Cover image for 1905. Count Sub Islands

1905. Count Sub Islands

Comments
4 min read
947. Most Stones Removed with Same Row or Column
Cover image for 947. Most Stones Removed with Same Row or Column

947. Most Stones Removed with Same Row or Column

Comments
3 min read
2699. Modify Graph Edge Weights
Cover image for 2699. Modify Graph Edge Weights

2699. Modify Graph Edge Weights

1
Comments
5 min read
1595. Minimum Cost to Connect Two Groups of Points
Cover image for 1595. Minimum Cost to Connect Two Groups of Points

1595. Minimum Cost to Connect Two Groups of Points

Comments
4 min read
2022. Convert 1D Array Into 2D Array
Cover image for 2022. Convert 1D Array Into 2D Array

2022. Convert 1D Array Into 2D Array

Comments
4 min read
1894. Find the Student that Will Replace the Chalk
Cover image for 1894. Find the Student that Will Replace the Chalk

1894. Find the Student that Will Replace the Chalk

Comments
4 min read
1894. Find the Student that Will Replace the Chalk
Cover image for 1894. Find the Student that Will Replace the Chalk

1894. Find the Student that Will Replace the Chalk

Comments
4 min read
1945. Sum of Digits of String After Convert
Cover image for 1945. Sum of Digits of String After Convert

1945. Sum of Digits of String After Convert

Comments
3 min read
874. Walking Robot Simulation
Cover image for 874. Walking Robot Simulation

874. Walking Robot Simulation

Comments
4 min read
2028. Find Missing Observations
Cover image for 2028. Find Missing Observations

2028. Find Missing Observations

Comments
4 min read
1367. Linked List in Binary Tree
Cover image for 1367. Linked List in Binary Tree

1367. Linked List in Binary Tree

2
Comments
4 min read
3217. Delete Nodes From Linked List Present in Array
Cover image for 3217. Delete Nodes From Linked List Present in Array

3217. Delete Nodes From Linked List Present in Array

1
Comments
4 min read
725. Split Linked List in Parts
Cover image for 725. Split Linked List in Parts

725. Split Linked List in Parts

1
Comments
4 min read
2326. Spiral Matrix IV
Cover image for 2326. Spiral Matrix IV

2326. Spiral Matrix IV

1
Comments
4 min read
2807. Insert Greatest Common Divisors in Linked List
Cover image for 2807. Insert Greatest Common Divisors in Linked List

2807. Insert Greatest Common Divisors in Linked List

1
Comments
4 min read
2220. Minimum Bit Flips to Convert Number
Cover image for 2220. Minimum Bit Flips to Convert Number

2220. Minimum Bit Flips to Convert Number

1
Comments
3 min read
1684. Count the Number of Consistent Strings
Cover image for 1684. Count the Number of Consistent Strings

1684. Count the Number of Consistent Strings

1
Comments
3 min read
1310. XOR Queries of a Subarray
Cover image for 1310. XOR Queries of a Subarray

1310. XOR Queries of a Subarray

Comments
3 min read
2419. Longest Subarray With Maximum Bitwise AND
Cover image for 2419. Longest Subarray With Maximum Bitwise AND

2419. Longest Subarray With Maximum Bitwise AND

Comments
3 min read
1371. Find the Longest Substring Containing Vowels in Even Counts
Cover image for 1371. Find the Longest Substring Containing Vowels in Even Counts

1371. Find the Longest Substring Containing Vowels in Even Counts

Comments
3 min read
539. Minimum Time Difference
Cover image for 539. Minimum Time Difference

539. Minimum Time Difference

1
Comments
2 min read
884. Uncommon Words from Two Sentences
Cover image for 884. Uncommon Words from Two Sentences

884. Uncommon Words from Two Sentences

Comments
3 min read
179. Largest Number
Cover image for 179. Largest Number

179. Largest Number

1
Comments
2 min read
241. Different Ways to Add Parentheses
Cover image for 241. Different Ways to Add Parentheses

241. Different Ways to Add Parentheses

Comments
3 min read
214. Shortest Palindrome
Cover image for 214. Shortest Palindrome

214. Shortest Palindrome

Comments
3 min read
386. Lexicographical Numbers
Cover image for 386. Lexicographical Numbers

386. Lexicographical Numbers

Comments
2 min read
440. K-th Smallest in Lexicographical Order
Cover image for 440. K-th Smallest in Lexicographical Order

440. K-th Smallest in Lexicographical Order

Comments
3 min read
2707. Extra Characters in a String
Cover image for 2707. Extra Characters in a String

2707. Extra Characters in a String

Comments
3 min read
3043. Find the Length of the Longest Common Prefix
Cover image for 3043. Find the Length of the Longest Common Prefix

3043. Find the Length of the Longest Common Prefix

Comments
3 min read
2416. Sum of Prefix Scores of Strings
Cover image for 2416. Sum of Prefix Scores of Strings

2416. Sum of Prefix Scores of Strings

Comments
4 min read
729. My Calendar I
Cover image for 729. My Calendar I

729. My Calendar I

Comments
4 min read
731. My Calendar II
Cover image for 731. My Calendar II

731. My Calendar II

Comments
4 min read
641. Design Circular Deque
Cover image for 641. Design Circular Deque

641. Design Circular Deque

1
Comments
4 min read
432. All O`one Data Structure
Cover image for 432. All O`one Data Structure

432. All O`one Data Structure

Comments
4 min read
1381. Design a Stack With Increment Operation
Cover image for 1381. Design a Stack With Increment Operation

1381. Design a Stack With Increment Operation

Comments
4 min read
1497. Check If Array Pairs Are Divisible by k
Cover image for 1497. Check If Array Pairs Are Divisible by k

1497. Check If Array Pairs Are Divisible by k

Comments
4 min read
1331. Rank Transform of an Array
Cover image for 1331. Rank Transform of an Array

1331. Rank Transform of an Array

Comments
3 min read
1590. Make Sum Divisible by P
Cover image for 1590. Make Sum Divisible by P

1590. Make Sum Divisible by P

Comments
4 min read
2491. Divide Players Into Teams of Equal Skill
Cover image for 2491. Divide Players Into Teams of Equal Skill

2491. Divide Players Into Teams of Equal Skill

Comments
3 min read
567. Permutation in String
Cover image for 567. Permutation in String

567. Permutation in String

1
Comments
3 min read
1813. Sentence Similarity III
Cover image for 1813. Sentence Similarity III

1813. Sentence Similarity III

Comments
3 min read
2696. Minimum String Length After Removing Substrings
Cover image for 2696. Minimum String Length After Removing Substrings

2696. Minimum String Length After Removing Substrings

Comments
3 min read
1963. Minimum Number of Swaps to Make the String Balanced
Cover image for 1963. Minimum Number of Swaps to Make the String Balanced

1963. Minimum Number of Swaps to Make the String Balanced

Comments
3 min read
1963. Minimum Number of Swaps to Make the String Balanced
Cover image for 1963. Minimum Number of Swaps to Make the String Balanced

1963. Minimum Number of Swaps to Make the String Balanced

Comments
3 min read
921. Minimum Add to Make Parentheses Valid
Cover image for 921. Minimum Add to Make Parentheses Valid

921. Minimum Add to Make Parentheses Valid

Comments
2 min read
962. Maximum Width Ramp
Cover image for 962. Maximum Width Ramp

962. Maximum Width Ramp

Comments
3 min read
1942. The Number of the Smallest Unoccupied Chair
Cover image for 1942. The Number of the Smallest Unoccupied Chair

1942. The Number of the Smallest Unoccupied Chair

Comments
279 min read
2406. Divide Intervals Into Minimum Number of Groups
Cover image for 2406. Divide Intervals Into Minimum Number of Groups

2406. Divide Intervals Into Minimum Number of Groups

Comments
3 min read
632. Smallest Range Covering Elements from K Lists
Cover image for 632. Smallest Range Covering Elements from K Lists

632. Smallest Range Covering Elements from K Lists

Comments
3 min read
2938. Separate Black and White Balls
Cover image for 2938. Separate Black and White Balls

2938. Separate Black and White Balls

Comments
4 min read
1405. Longest Happy String
Cover image for 1405. Longest Happy String

1405. Longest Happy String

Comments
3 min read
670. Maximum Swap
Cover image for 670. Maximum Swap

670. Maximum Swap

Comments
2 min read
2044. Count Number of Maximum Bitwise-OR Subsets
Cover image for 2044. Count Number of Maximum Bitwise-OR Subsets

2044. Count Number of Maximum Bitwise-OR Subsets

Comments
3 min read
1545. Find Kth Bit in Nth Binary String
Cover image for 1545. Find Kth Bit in Nth Binary String

1545. Find Kth Bit in Nth Binary String

Comments
4 min read
1106. Parsing A Boolean Expression
Cover image for 1106. Parsing A Boolean Expression

1106. Parsing A Boolean Expression

Comments
4 min read
1593. Split a String Into the Max Number of Unique Substrings
Cover image for 1593. Split a String Into the Max Number of Unique Substrings

1593. Split a String Into the Max Number of Unique Substrings

2
Comments
3 min read
2583. Kth Largest Sum in a Binary Tree
Cover image for 2583. Kth Largest Sum in a Binary Tree

2583. Kth Largest Sum in a Binary Tree

6
Comments
4 min read
2641. Cousins in Binary Tree II
Cover image for 2641. Cousins in Binary Tree II

2641. Cousins in Binary Tree II

Comments
5 min read
951. Flip Equivalent Binary Trees
Cover image for 951. Flip Equivalent Binary Trees

951. Flip Equivalent Binary Trees

Comments
3 min read
1233. Remove Sub-Folders from the Filesystem
Cover image for 1233. Remove Sub-Folders from the Filesystem

1233. Remove Sub-Folders from the Filesystem

Comments
3 min read
2458. Height of Binary Tree After Subtree Removal Queries
Cover image for 2458. Height of Binary Tree After Subtree Removal Queries

2458. Height of Binary Tree After Subtree Removal Queries

Comments
4 min read
1277. Count Square Submatrices with All Ones
Cover image for 1277. Count Square Submatrices with All Ones

1277. Count Square Submatrices with All Ones

Comments
3 min read
Learning from 200+ LeetCode Problems: A Guide to Building Strong Problem-Solving Skills
Cover image for Learning from 200+ LeetCode Problems: A Guide to Building Strong Problem-Solving Skills

Learning from 200+ LeetCode Problems: A Guide to Building Strong Problem-Solving Skills

Comments
3 min read
2501. Longest Square Streak in an Array
Cover image for 2501. Longest Square Streak in an Array

2501. Longest Square Streak in an Array

Comments
3 min read
2684. Maximum Number of Moves in a Grid
Cover image for 2684. Maximum Number of Moves in a Grid

2684. Maximum Number of Moves in a Grid

1
Comments
3 min read
1671. Minimum Number of Removals to Make Mountain Array
Cover image for 1671. Minimum Number of Removals to Make Mountain Array

1671. Minimum Number of Removals to Make Mountain Array

Comments
3 min read
2463. Minimum Total Distance Traveled
Cover image for 2463. Minimum Total Distance Traveled

2463. Minimum Total Distance Traveled

1
Comments
5 min read
1957. Delete Characters to Make Fancy String
Cover image for 1957. Delete Characters to Make Fancy String

1957. Delete Characters to Make Fancy String

Comments
2 min read
2490. Circular Sentence
Cover image for 2490. Circular Sentence

2490. Circular Sentence

Comments
3 min read
796. Rotate String
Cover image for 796. Rotate String

796. Rotate String

1
Comments
2 min read
3163. String Compression III
Cover image for 3163. String Compression III

3163. String Compression III

Comments
3 min read
2914. Minimum Number of Changes to Make Binary String Beautiful
Cover image for 2914. Minimum Number of Changes to Make Binary String Beautiful

2914. Minimum Number of Changes to Make Binary String Beautiful

Comments
3 min read
3011. Find if Array Can Be Sorted
Cover image for 3011. Find if Array Can Be Sorted

3011. Find if Array Can Be Sorted

Comments
4 min read
2275. Largest Combination With Bitwise AND Greater Than Zero
Cover image for 2275. Largest Combination With Bitwise AND Greater Than Zero

2275. Largest Combination With Bitwise AND Greater Than Zero

Comments
3 min read
1829. Maximum XOR for Each Query
Cover image for 1829. Maximum XOR for Each Query

1829. Maximum XOR for Each Query

Comments
4 min read
3133. Minimum Array End
Cover image for 3133. Minimum Array End

3133. Minimum Array End

Comments
3 min read
3097. Shortest Subarray With OR at Least K II
Cover image for 3097. Shortest Subarray With OR at Least K II

3097. Shortest Subarray With OR at Least K II

1
Comments
4 min read
2601. Prime Subtraction Operation
Cover image for 2601. Prime Subtraction Operation

2601. Prime Subtraction Operation

3
Comments
3 min read
2070. Most Beautiful Item for Each Query
Cover image for 2070. Most Beautiful Item for Each Query

2070. Most Beautiful Item for Each Query

Comments
4 min read
2563. Count the Number of Fair Pairs
Cover image for 2563. Count the Number of Fair Pairs

2563. Count the Number of Fair Pairs

Comments
3 min read
2064. Minimized Maximum of Products Distributed to Any Store
Cover image for 2064. Minimized Maximum of Products Distributed to Any Store

2064. Minimized Maximum of Products Distributed to Any Store

Comments
4 min read
1574. Shortest Subarray to be Removed to Make Array Sorted
Cover image for 1574. Shortest Subarray to be Removed to Make Array Sorted

1574. Shortest Subarray to be Removed to Make Array Sorted

Comments
3 min read
3254. Find the Power of K-Size Subarrays I
Cover image for 3254. Find the Power of K-Size Subarrays I

3254. Find the Power of K-Size Subarrays I

Comments
4 min read
862. Shortest Subarray with Sum at Least K
Cover image for 862. Shortest Subarray with Sum at Least K

862. Shortest Subarray with Sum at Least K

Comments
3 min read
1652. Defuse the Bomb
Cover image for 1652. Defuse the Bomb

1652. Defuse the Bomb

Comments
3 min read
2461. Maximum Sum of Distinct Subarrays With Length K
Cover image for 2461. Maximum Sum of Distinct Subarrays With Length K

2461. Maximum Sum of Distinct Subarrays With Length K

Comments
4 min read
2516. Take K of Each Character From Left and Right
Cover image for 2516. Take K of Each Character From Left and Right

2516. Take K of Each Character From Left and Right

Comments
4 min read
2257. Count Unguarded Cells in the Grid
Cover image for 2257. Count Unguarded Cells in the Grid

2257. Count Unguarded Cells in the Grid

Comments
4 min read
1072. Flip Columns For Maximum Number of Equal Rows
Cover image for 1072. Flip Columns For Maximum Number of Equal Rows

1072. Flip Columns For Maximum Number of Equal Rows

Comments
3 min read
1861. Rotating the Box
Cover image for 1861. Rotating the Box

1861. Rotating the Box

Comments
3 min read
1975. Maximum Matrix Sum
Cover image for 1975. Maximum Matrix Sum

1975. Maximum Matrix Sum

Comments
3 min read
773. Sliding Puzzle
Cover image for 773. Sliding Puzzle

773. Sliding Puzzle

Comments
4 min read
2924. Find Champion II
Cover image for 2924. Find Champion II

2924. Find Champion II

Comments
4 min read
3243. Shortest Distance After Road Addition Queries I
Cover image for 3243. Shortest Distance After Road Addition Queries I

3243. Shortest Distance After Road Addition Queries I

Comments
5 min read
2290. Minimum Obstacle Removal to Reach Corner
Cover image for 2290. Minimum Obstacle Removal to Reach Corner

2290. Minimum Obstacle Removal to Reach Corner

Comments
4 min read
2577. Minimum Time to Visit a Cell In a Grid
Cover image for 2577. Minimum Time to Visit a Cell In a Grid

2577. Minimum Time to Visit a Cell In a Grid

Comments
4 min read
2097. Valid Arrangement of Pairs
Cover image for 2097. Valid Arrangement of Pairs

2097. Valid Arrangement of Pairs

Comments
4 min read
1346. Check If N and Its Double Exist
Cover image for 1346. Check If N and Its Double Exist

1346. Check If N and Its Double Exist

Comments
3 min read
1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence
Cover image for 1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence

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

Comments
3 min read
2109. Adding Spaces to a String
Cover image for 2109. Adding Spaces to a String

2109. Adding Spaces to a String

Comments 1
3 min read
2825. Make String a Subsequence Using Cyclic Increments
Cover image for 2825. Make String a Subsequence Using Cyclic Increments

2825. Make String a Subsequence Using Cyclic Increments

Comments
3 min read
2337. Move Pieces to Obtain a String
Cover image for 2337. Move Pieces to Obtain a String

2337. Move Pieces to Obtain a String

Comments
5 min read
2554. Maximum Number of Integers to Choose From a Range I
Cover image for 2554. Maximum Number of Integers to Choose From a Range I

2554. Maximum Number of Integers to Choose From a Range I

Comments
5 min read
1760. Minimum Limit of Balls in a Bag
Cover image for 1760. Minimum Limit of Balls in a Bag

1760. Minimum Limit of Balls in a Bag

Comments
4 min read
2054. Two Best Non-Overlapping Events
Cover image for 2054. Two Best Non-Overlapping Events

2054. Two Best Non-Overlapping Events

6
Comments
3 min read
3152. Special Array II
Cover image for 3152. Special Array II

3152. Special Array II

Comments
4 min read
2981. Find Longest Special Substring That Occurs Thrice I
Cover image for 2981. Find Longest Special Substring That Occurs Thrice I

2981. Find Longest Special Substring That Occurs Thrice I

1
Comments
3 min read
2779. Maximum Beauty of an Array After Applying Operation
Cover image for 2779. Maximum Beauty of an Array After Applying Operation

2779. Maximum Beauty of an Array After Applying Operation

Comments
3 min read
2558. Take Gifts From the Richest Pile
Cover image for 2558. Take Gifts From the Richest Pile

2558. Take Gifts From the Richest Pile

Comments
4 min read
2593. Find Score of an Array After Marking All Elements
Cover image for 2593. Find Score of an Array After Marking All Elements

2593. Find Score of an Array After Marking All Elements

3
Comments
3 min read
2762. Continuous Subarrays
Cover image for 2762. Continuous Subarrays

2762. Continuous Subarrays

Comments
3 min read
1792. Maximum Average Pass Ratio
Cover image for 1792. Maximum Average Pass Ratio

1792. Maximum Average Pass Ratio

Comments
4 min read
3264. Final Array State After K Multiplication Operations I
Cover image for 3264. Final Array State After K Multiplication Operations I

3264. Final Array State After K Multiplication Operations I

Comments
3 min read
2182. Construct String With Repeat Limit
Cover image for 2182. Construct String With Repeat Limit

2182. Construct String With Repeat Limit

1
Comments
4 min read
1475. Final Prices With a Special Discount in a Shop
Cover image for 1475. Final Prices With a Special Discount in a Shop

1475. Final Prices With a Special Discount in a Shop

Comments
4 min read
769. Max Chunks To Make Sorted
Cover image for 769. Max Chunks To Make Sorted

769. Max Chunks To Make Sorted

Comments
3 min read
2415. Reverse Odd Levels of Binary Tree
Cover image for 2415. Reverse Odd Levels of Binary Tree

2415. Reverse Odd Levels of Binary Tree

Comments
5 min read
2872. Maximum Number of K-Divisible Components
Cover image for 2872. Maximum Number of K-Divisible Components

2872. Maximum Number of K-Divisible Components

Comments
6 min read