Skip to content

N-dcool/Leetcode-Questions

Repository files navigation

Leetcode-Questions

LeetCode Stats

Leetcode Problems of the Day:

  • 17 Dec => Evaluate Reverse Polish Notation
  • 18 Dec => Daily Temperatures.
  • 19 Dec => Find if Path Exists in Graph.
  • 20 Dec => Keys and Rooms.
  • 21 Dec => Possible Bipartition.
  • 22 Dec => Sum of Distances in Tree.
  • 23 Dec => Best Time to Buy and Sell Stock with Cooldown.
  • 24 Dec => Domino and Tromino Tiling.
  • 25 Dec => Longest Subsequence With Limited Sum.
  • 26 Dec => Jump Game.
  • 27 Dec => Maximum Bags With Full Capacity of Rocks.
  • 28 Dec => Remove Stones to Minimize the Total.
  • 29 Dec => Single-Threaded CPU.
  • 30 Dec => All Paths From Source to Target.
  • 31 Dec => Unique Paths III.

Year 2023

  • 1 Jan => Word Pattern.

  • 2 Jan => Detect Capital.

  • 3 Jan => Delete Columns to Make Sorted.

  • 4 Jan => Minimum Rounds to Complete All Tasks.

  • 5 Jan => Minimum Number of Arrows to Burst Balloons.

  • 6 Jan => Maximum Ice Cream Bars.

  • 7 Jan => Gas Station.

  • 8 Jan => Max Points on a Line.

  • 9 Jan => Binary Tree Preorder Traversal.

  • 10 Jan => Same Tree.

  • 11 Jan => Minimum Time to Collect All Apples in a Tree.

  • 12 Jan => Number of Nodes in the Sub-Tree With the Same Label.

  • 13 Jan => Longest Path With Different Adjacent Characters.

  • 14 Jan => Lexicographically Smallest Equivalent String.

  • 15 Jan => Number of Good Paths.

  • 16 Jan => Insert Interval.

  • 17 Jan => Flip String to Monotone Increasing.

  • 18 Jan => Maximum Sum Circular Subarray.

  • 19 Jan => Subarray Sums Divisible by K.

  • 20 Jan => Non-decreasing Subsequences.

  • 21 Jan => Restore IP Addresses.

  • 22 Jan => Palindrome Partitioning.

  • 23 Jan => Find the Town Judge.

  • 24 Jan => Snakes and Ladders

  • 25 Jan => Find Closest Node to Given Two Nodes

  • 26 Jan => Cheapest Flights Within K Stops

  • 27 Jan => Concatenated Words

  • 28 Jan => Data Stream as Disjoint Intervals

  • 29 Jan => LFU Cache

  • 30 Jan => N-th Tribonacci Number

  • 31 Jan => Best Team With No Conflicts

  • 1 Feb => Greatest Common Divisor of Strings

  • 2 Feb => Verifying an Alien Dictionary

  • 3 Feb => Zigzag Conversion

  • 4 Feb => Permutation in String

  • 5 Feb => Find All Anagrams in a String

  • 6 Feb => Shuffle the Array

  • 7 Feb => Fruit Into Baskets

  • 8 Feb => Jump Game II

  • 9 Feb => Naming a Company

  • 10 Feb => As Far from Land as Possible

  • 11 Feb => Shortest Path with Alternating Colors

  • 12 Feb => Minimum Fuel Cost to Report to the Capital

  • 13 Feb => Count Odd Numbers in an Interval Range

  • 14 Feb => Add BinaryπŸ’–

  • 15 Feb => Add to Array-Form of Integer

  • 16 Feb => Maximum Depth of Binary Tree

  • 17 Feb => Minimum Distance Between BST Nodes

  • 18 Feb => Invert Binary Tree

  • 19 Feb => Binary Tree Zigzag Level Order Traversal

  • 20 Feb => Search Insert Position

  • 21 Feb => Single Element in a Sorted Array

  • 22 Feb => Capacity To Ship Packages Within D Days

  • 23 Feb => IPO

  • 24 Feb => Minimize Deviation in Array

  • 25 Feb => Best Time to Buy and Sell Stock

  • 26 Feb => Edit Distance

  • 27 Feb => Construct Quad Tree

  • 28 Feb => Find Duplicate Subtrees

  • 1 Mar => Sort an Array

  • 2 Mar => String Compression

  • 3 Mar => Find the Index of the First Occurrence in a String

  • 4 Mar => Count Subarrays With Fixed Bounds

  • 5 Mar => Jump Game IV

  • 6 Mar => Kth Missing Positive Number

  • 7 Mar => Minimum Time to Complete Trips

  • 8 Mar => Koko Eating Bananas

  • 9 Mar => Linked List Cycle II

  • 10 Mar => Linked List Random Node

  • 11 Mar => Convert Sorted List to Binary Search Tree

  • 12 Mar => Merge k Sorted Lists

  • 13 Mar => Symmetric Tree

  • 14 Mar => Sum Root to Leaf Numbers

  • 15 Mar => Check Completeness of a Binary Tree

  • 16 Mar => Construct Binary Tree from Inorder and Postorder Traversal

  • 17 Mar => Implement Trie (Prefix Tree)

  • 18 Mar => Design Browser History

  • 19 Mar => Design Add and Search Words Data Structure

  • 20 Mar => Can Place Flowers

  • 21 Mar => Number of Zero-Filled Subarrays

  • 22 Mar => Minimum Score of a Path Between Two Cities

  • 23 Mar => Number of Operations to Make Network Connected

  • 24 Mar => Reorder Routes to Make All Paths Lead to the City Zero

  • 25 Mar => Count Unreachable Pairs of Nodes in an Undirected Graph

  • 26 Mar => Longest Cycle in a Graph

  • 27 Mar => Minimum Path Sum

  • 28 Mar => Minimum Cost For Tickets

  • 29 Mar => Reducing Dishes

  • 30 Mar => Scramble String

  • 31 Mar => Number of Ways of Cutting a Pizza

  • 1 Apr => Binary Search

  • 2 Apr => Successful Pairs of Spells and Potions

  • 3 Apr => Boats to Save People

  • 4 Apr => Optimal Partition of String

  • 5 Apr => Minimize Maximum of Array

  • 6 Apr => Number of Closed Islands

  • 7 Apr => Number of Enclaves

  • 8 Apr => Clone Graph

  • 9 Apr => Largest Color Value in a Directed Graph

  • 10 Apr => Valid Parentheses

  • 11 Apr => Removing Stars From a String

  • 12 Apr => Simplify Path

  • 13 Apr => Validate Stack Sequences

  • 14 Apr => Longest Palindromic Subsequence

  • 15 Apr => Maximum Value of K Coins From Piles

  • 16 Apr => Number of Ways to Form a Target String Given a Dictionary

  • 17 Apr => Kids With the Greatest Number of Candies

  • 18 Apr => Merge Strings Alternately

  • 19 Apr => Longest ZigZag Path in a Binary Tree

  • 20 Apr => Maximum Width of Binary Tree

  • 21 Apr => Profitable Schemes

  • 22 Apr => Minimum Insertion Steps to Make a String Palindrome

  • 23 Apr => Restore The Array

  • 24 Apr => Last Stone Weight

  • 25 Apr => Smallest Number in Infinite Set

  • 26 Apr => Add Digits

  • 27 Apr => Bulb Switcher

  • 28 Apr => Similar String Groups

  • 29 Apr => Checking Existence of Edge Length Limited Paths

  • 30 Apr => Remove Max Number of Edges to Keep Graph Fully Traversable

  • 1 May => Average Salary Excluding the Minimum and Maximum Salary

  • 2 May => Sign of the Product of an Array

  • 3 May => Find the Difference of Two Arrays

  • 4 May => Dota2 Senate

  • 5 May => Maximum Number of Vowels in a Substring of Given Length

  • 6 May => Number of Subsequences That Satisfy the Given Sum Condition

  • 7 May => Find the Longest Valid Obstacle Course at Each Position

  • 8 May => Matrix Diagonal Sum

  • 9 May => Spiral Matrix

  • 10 May => Spiral Matrix II

  • 11 May => Uncrossed Lines

  • 12 May => Solving Questions With Brainpower

  • 13 May => Count Ways To Build Good Strings

  • 14 May => Maximize Score After N Operations

  • 15 May => Swapping Nodes in a Linked List

  • 16 May => Swap Nodes in Pairs

  • 17 May => Maximum Twin Sum of a Linked List

  • 18 May => Minimum Number of Vertices to Reach All Nodes

  • 19 May => Is Graph Bipartite?

  • 20 May => Evaluate Division

  • 21 May => Shortest Bridge

  • 22 May => Top K Frequent Elements

  • 23 May => Kth Largest Element in a Stream

  • 24 May => Maximum Subsequence Score

  • 25 May => New 21 Game

  • 26 May => Stone Game II

  • 27 May => Stone Game III

  • 28 May => Minimum Cost to Cut a Stick

  • 29 May => Design Parking System

  • 30 May => Design HashSet

  • 31 May => Design Underground System

  • 1 Jun => Shortest Path in Binary Matrix

  • 2 Jun => Detonate the Maximum Bombs

  • 3 Jun => Time Needed to Inform All Employees

  • 4 Jun => Number of Provinces

  • 5 Jun => Check If It Is a Straight Line

  • 6 Jun => Can Make Arithmetic Progression From Sequence

  • 7 Jun => Minimum Flips to Make a OR b Equal to c

  • 8 Jun => Count Negative Numbers in a Sorted Matrix

  • 9 Jun => Find Smallest Letter Greater Than Target

  • 10 Jun => Maximum Value at a Given Index in a Bounded Array

  • 11 Jun => Snapshot Array

  • 12 Jun => Summary Ranges

  • 13 Jun => Equal Row and Column Pairs

  • 14 Jun => Minimum Absolute Difference in BST

  • 15 Jun => Maximum Level Sum of a Binary Tree

  • 16 Jun => Number of Ways to Reorder Array to Get Same BST

  • 17 Jun => Make Array Strictly Increasing

  • 18 Jun => Number of Increasing Paths in a Grid

  • 19 Jun => Find the Highest Altitude

  • 20 Jun => K Radius Subarray Averages

  • 21 Jun => Minimum Cost to Make Array Equal

  • 22 Jun => Best Time to Buy and Sell Stock with Transaction Fee

  • 23 Jun => Longest Arithmetic Subsequence

  • 24 Jun => Tallest Billboard

  • 25 Jun => Count All Possible Routes

  • 26 Jun => Total Cost to Hire K Workers

  • 27 Jun => Find K Pairs with Smallest Sums

  • 28 Jun => Path with Maximum Probability

  • 29 Jun => Shortest Path to Get All Keys

  • 30 Jun => Last Day Where You Can Still Cross

  • 1 July => Fair Distribution of Cookies

  • 2 July => Maximum Number of Achievable Transfer Requests

  • 3 July => Buddy Strings

  • 4 July => Single Number II

  • 5 July => Longest Subarray of 1's After Deleting One Element

  • 6 July => Minimum Size Subarray Sum

  • 7 July => Maximize the Confusion of an Exam

  • 8 July => Put Marbles in Bags

  • 9 July => Substring With Largest Variance

  • 10 July => Minimum Depth of Binary Tree

  • 11 July => All Nodes Distance K in Binary Tree

  • 12 July => Find Eventual Safe States

  • 13 July => Course Schedule

  • 14 July => Longest Arithmetic Subsequence of Given Difference

  • 15 July => Maximum Number of Events That Can Be Attended II

  • 16 July => Smallest Sufficient Team

  • 17 July => Add Two Numbers II

  • 18 July => LRU Cache

  • 19 July => Non-overlapping Intervals

  • 20 July => Asteroid Collision

  • 21 July => Number of Longest Increasing Subsequence

  • 22 July => Knight Probability in Chessboard

  • 23 July => All Possible Full Binary Trees

  • 24 July => Pow(x, n)

  • 25 July => Peak Index in a Mountain Array

  • 26 July => Minimum Speed to Arrive on Time

  • 27 July => Maximum Running Time of N Computers

  • 28 July => Predict the Winner

  • 29 July => Soup Servings πŸ’€

  • 30 July => Strange Printer

  • 31 July => Minimum ASCII Delete Sum for Two Strings

  • 1 Aug => Combinations

  • 2 Aug => Permutations

  • 3 Aug => Letter Combinations of a Phone Number

  • 4 Aug => Word Break

  • 5 Aug => Unique Binary Search Trees II

  • 6 Aug => Number of Music Playlists

  • 7 Aug => Search a 2D Matrix

  • 8 Aug => Search in Rotated Sorted Array

  • 9 Aug => Minimize the Maximum Difference of Pairs

  • 10 Aug => Search in Rotated Sorted Array II

  • 11 Aug => Coin Change II

  • 12 Aug => Unique Paths II

  • 13 Aug => Check if There is a Valid Partition For The Array

  • 14 Aug => Kth Largest Element in an Array

  • 15 Aug => Partition List

  • 16 Aug => Sliding Window Maximum

  • 17 Aug => 01 Matrix

  • 18 Aug => Maximal Network Rank

  • 19 Aug => Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree

  • 20 Aug => Sort Items by Groups Respecting Dependencies

  • 21 Aug => Repeated Substring Pattern

  • 22 Aug => Excel Sheet Column Title

  • 23 Aug => Reorganize String

  • 24 Aug => Text Justification

  • 25 Aug => Interleaving String

  • 26 Aug => Maximum Length of Pair Chain

  • 27 Aug => Frog Jump

  • 28 Aug => Implement Stack using Queues

  • 29 Aug => Minimum Penalty for a Shop

  • 30 Aug => Minimum Replacements to Sort the Array

  • 31 Aug => Minimum Number of Taps to Open to Water a Garden(Intervals)

  • 1 Sep => Counting Bits

  • 2 Sep => Extra Characters in a String

  • 3 Sep => Unique Paths

  • 4 Sep => Linked List Cycle

  • 5 Sep => Copy List with Random Pointer

  • 6 Sep => Split Linked List in Parts

  • 7 Sep => Reverse Linked List II

  • 8 Sep => Pascal's Triangle

  • 9 Sep => Combination Sum IV

  • 10 Sep => Count All Valid Pickup and Delivery Options

  • 11 Sep => Group the People Given the Group Size They Belong To

  • 12 Sep => Minimum Deletions to Make Character Frequencies Unique

  • 13 Sep => Candy

  • 14 Sep => Reconstruct Itinerary

  • 15 Sep => Min Cost to Connect All Points

  • 16 Sep => Path With Minimum Effort

  • 17 Sep => Shortest Path Visiting All Nodes

  • 18 Sep => The K Weakest Rows in a Matrix

  • 19 Sep => Find the Duplicate Number

  • 20 Sep => Minimum Operations to Reduce X to Zero

  • 21 Sep => Median of Two Sorted Arrays

  • 22 Sep => Is Subsequence

  • 23 Sep => Longest String Chain

  • 24 Sep => Champagne Tower

  • 25 Sep => Find the Difference

  • 26 Sep => Remove Duplicate Letters

  • 27 Sep => Decoded String at Index

  • 28 Sep => Sort Array By Parity

  • 29 Sep => Monotonic Array

  • 30 Sep => 132 Pattern

  • 1 Oct => Reverse Words in a String III

  • 2 Oct πŸŽ‚ => Remove Colored Pieces if Both Neighbors are the Same Color

  • 3 Oct => Number of Good Pairs

  • 4 Oct => Design HashMap

  • 5 Oct => Majority Element II

  • 6 Oct => Integer Break

  • 7 Oct => Build Array Where You Can Find The Maximum Exactly K Comparisons

  • 8 Oct => Max Dot Product of Two Subsequences

  • 9 Oct => Find First and Last Position of Element in Sorted Array

  • 10 Oct => Minimum Number of Operations to Make Array Continuous

  • 11 Oct => Number of Flowers in Full Bloom

  • 12 Oct => Find in Mountain Array

  • 13 Oct => Min Cost Climbing Stairs

  • 14 Oct => Painting the Walls

  • 15 Oct => Number of Ways to Stay in the Same Place After Some Steps

  • 16 Oct => Pascal's Triangle II

  • 17 Oct => Validate Binary Tree Nodes

  • 18 Oct => Parallel Courses III

  • 19 Oct => Backspace String Compare

  • 20 Oct => Flatten Nested List Iterator

  • 21 Oct => Constrained Subsequence Sum

  • 22 Oct => Maximum Score of a Good Subarray

  • 23 Oct => Power of Four

  • 24 Oct => Find Largest Value in Each Tree Row

  • 25 Oct => K-th Symbol in Grammar

  • 26 Oct => Binary Trees With Factors

  • 27 Oct => Longest Palindromic Substring

  • 28 Oct => Count Vowels Permutation

  • 29 Oct => Poor Pigs

  • 30 Oct => Sort Integers by The Number of 1 Bits

  • 31 Oct => Find The Original Array of Prefix Xor

  • 1 Nov => Find Mode in Binary Search Tree

  • 2 Nov => Count Nodes Equal to Average of Subtree

  • 3 Nov => Build an Array With Stack Operations

  • 4 Nov => Last Moment Before All Ants Fall Out of a Plank

  • 5 Nov => Find the Winner of an Array Game

  • 6 Nov => Seat Reservation Manager

  • 7 Nov => Eliminate Maximum Number of Monsters

  • 8 Nov => Determine if a Cell Is Reachable at a Given Time

  • 9 Nov => Count Number of Homogenous Substrings

  • 10 Nov => Restore the Array From Adjacent Pairs

  • 11 Nov => Design Graph With Shortest Path Calculator

  • 12 Nov => Bus Routes

  • 13 Nov => Sort Vowels in a String

  • 14 Nov => Unique Length-3 Palindromic Subsequences

  • 15 Nov => Maximum Element After Decreasing and Rearranging

  • 16 Nov => Find Unique Binary String

  • 17 Nov => Minimize Maximum Pair Sum in Array

  • 18 Nov => Frequency of the Most Frequent Element

  • 19 Nov => Reduction Operations to Make the Array Elements Equal

  • 20 Nov => Minimum Amount of Time to Collect Garbage

  • 21 Nov => Count Nice Pairs in an Array

  • 22 Nov => Diagonal Traverse II

  • 23 Nov => Arithmetic Subarrays

  • 24 Nov => Maximum Number of Coins You Can Get

  • 25 Nov => Sum of Absolute Differences in a Sorted Array

  • 26 Nov => Largest Submatrix With Rearrangements

  • 27 Nov => Knight Dialer

  • 28 Nov => Number of Ways to Divide a Long Corridor

  • 29 Nov => Number of 1 Bits

  • 30 Nov => Minimum One Bit Operations to Make Integers Zero

  • 1 Dec => Check If Two String Arrays are Equivalent

  • 2 Dec => Find Words That Can Be Formed by Characters

  • 3 Dec => Minimum Time Visiting All Points

  • 4 Dec => Largest 3-Same-Digit Number in String

  • 5 Dec => Count of Matches in Tournament

  • 6 Dec => Calculate Money in Leetcode Bank

  • 7 Dec => Largest Odd Number in String

  • 8 Dec => Construct String from Binary Tree

  • 9 Dec => Binary Tree Inorder Traversal

  • 10 Dec => Transpose Matrix

  • 11 Dec => Element Appearing More Than 25% In Sorted Array

  • 12 Dec => Maximum Product of Two Elements in an Array

  • 13 Dec => Special Positions in a Binary Matrix

  • 14 Dec => Difference Between Ones and Zeros in Row and Column

  • 15 Dec => Destination City

  • 16 Dec => Valid Anagram

  • 17 Dec => Design a Food Rating System

  • 18 Dec => Maximum Product Difference Between Two Pairs

  • 19 Dec => Image Smoother

  • 20 Dec => Buy Two Chocolates

  • 21 Dec => Widest Vertical Area Between Two Points Containing No Points

  • 22 Dec => Maximum Score After Splitting a String

  • 23 Dec => Path Crossing

  • 24 Dec => Minimum Changes To Make Alternating Binary String

  • 25 Dec πŸ§‘πŸ»β€πŸŽ„ => Decode Ways

  • 26 Dec => Number of Dice Rolls With Target Sum

  • 27 Dec => Minimum Time to Make Rope Colorful

  • 28 Dec => String Compression II

  • 29 Dec => Minimum Difficulty of a Job Schedule

  • 30 Dec => Redistribute Characters to Make All Strings Equal

  • 31 Dec => Largest Substring Between Two Equal Characters

Year 2024

  • 1 Jan => Assign Cookies
  • 2 Jan => Convert an Array Into a 2D Array With Conditions
  • 3 Jan => Number of Laser Beams in a Bank
  • 4 Jan => Minimum Number of Operations to Make Array Empty
  • 5 Jan => Longest Increasing Subsequence
  • 6 Jan => Maximum Profit in Job Scheduling
  • 7 Jan => Arithmetic Slices II - Subsequence
  • 8 Jan => Range Sum of BST
  • 9 Jan => Leaf-Similar Trees
  • 10 Jan => Amount of Time for Binary Tree to Be Infected
  • 11 Jan => Maximum Difference Between Node and Ancestor
  • 12 Jan => Determine if String Halves Are Alike
  • 13 Jan => Minimum Number of Steps to Make Two Strings Anagram
  • 14 Jan => Determine if Two Strings Are Close
  • 15 Jan => Find Players With Zero or One Losses
  • 16 Jan => Insert Delete GetRandom O(1)
  • 17 Jan => Unique Number of Occurrences
  • 18 Jan => Climbing Stairs
  • 19 Jan => Minimum Falling Path Sum
  • 20 Jan => Sum of Subarray Minimums
  • 21 Jan => House Robber
  • 22 Jan => Set Mismatch
  • 23 Jan => Maximum Length of a Concatenated String with Unique Characters
  • 24 Jan => Pseudo-Palindromic Paths in a Binary Tree
  • 25 Jan => Longest Common Subsequence
  • 26 Jan => Out of Boundary Paths
  • 27 Jan => K Inverse Pairs Array
  • 28 Jan => Number of Submatrices That Sum to Target
  • 29 Jan => Implement Queue using Stacks
  • 30 Jan => Evaluate Reverse Polish Notation
  • 31 Jan => Daily Temperatures
  • 1 Feb => Divide Array Into Arrays With Max Difference
  • 2 Feb => Sequential Digits
  • 3 Feb => Partition Array for Maximum Sum
  • 4 Feb => Minimum Window Substring
  • 5 Feb => First Unique Character in a String
  • 6 Feb => Group Anagrams
  • 7 Feb => Sort Characters By Frequency
  • 8 Feb => Perfect Squares
  • 9 Feb => Largest Divisible Subset
  • 10 Feb => Palindromic Substrings
  • 19 Feb => Power of Two

🫑Hall of Fame πŸ† :

struggle


πŸ€“ Author

Myself
Naresh Choudhary

πŸ’»

leetcode

πŸ§‘πŸ»β€πŸ’» JAVA

Feel free to star ⭐ this repository if you like what you see πŸ˜‰.