Srujan's problems
114 logged from Srujan's dsa-problems journal. Search or filter by difficulty.
Following a set list? LeetCode 75 tracks just those 75, with your progress.
114 of 114
- 01Two Sum
LeetCode · Hash Table+9Easy
- 01Contains DuplicateNeetCode 150 · Hash Table / Set+9Easy
- 02Sparse ArraysHackerRank · Hash Table, Frequency CounterEasy
- 03Max Element in ArraySmart Interviews · Linear Traversal / Simple ScanEasy
- 03The Missing NumberCustom · Summation/XOR LogicEasy
- 03Odd and Even SumCustom · Conditional SummationEasy
- 04Find Duplicate Number in ArraySmart Interviews · Cycle Detection (Floyd's Tortoise and Hare)Medium
- 04Number Distribution (Frequency Count)Smart Interviews · Frequency Counting / HashingEasy
- 05Triangle ValidatorSmart Interviews · Geometry / Inequality RuleEasy
- 05Arithmetic OperatorsSmart Interviews · Conditional Logic / SwitchEasy
- 05Arithmetic Progression CheckSmart Interviews · Sequence Check / DifferenceEasy
- 05FactorialSmart Interviews · Iteration / RecursionEasy
- 05Natural Numbers SumSmart Interviews · Arithmetic Series FormulaEasy
- 06Matrix Row and Column SumsSmart Interviews · Streaming Input / 1D Array SimulationEasy
- 06Lower Triangle SumSmart Interviews · Index-based Traversal / ConditionalsEasy
- 06Submatrix SumCustom/Smart Interviews · Range Query / 2D Prefix Sum (Optimized)Medium
- 07Filled and Hollow RectangleCustom · Basic Nested LoopsEasy
- 07Half Diamond PatternCustom · Symmetry CombinationEasy
- 07Triangle and Pyramid PatternsCustom · Row-Index Dependent PrintingEasy
- 08Odd Even IndexSmart Interviews · Index-based Conditional TraversalEasy
- 08Digit String CheckSmart Interviews · Character Type CheckEasy
- 08Letter Coverage (Pangram Check)Smart Interviews · Boolean Array / Frequency HashingEasy
- 08Vowels and ConsonantsSmart Interviews · Character Set CheckEasy
- 09Compress String (Run-Length Encoding)Smart Interviews · Run-Length Encoding / Two PointersMedium
- 09Reverse Words in a String
LeetCode · Word Traversal / Stack / Two Pointers+9Medium
- 09Valid Palindrome (Alpha-Numeric Filter)
LeetCode · Two Pointers / Filtering+9Easy
- 10Roman to Integer
LeetCode · Conditional Traversal / Hash Map Lookup+9Easy
- 10First Unique Character in a String
LeetCode · Two-Pass Hashing / Frequency Count+9Easy
- 10Integer to Roman
LeetCode · Greedy Lookup / Paired Hash Map+9Medium
- 10Valid Parentheses
LeetCode · Stack / Hash Map Lookup+9Easy
- 11Rotation of Matrix (90 Degrees Clockwise)Smart Interviews · In-Place Transpose & ReverseMedium
- 11Diagonal Traversal of MatrixSmart Interviews · Index GroupingMedium
- 11Spiral Traversal of MatrixSmart Interviews · Boundary PointersMedium
- 12Ternary Array CostSmart Interviews · Local Cost Minimization / GreedyMedium
- 12Alternate SeatingSmart Interviews · Greedy Allocation / Boundary CheckMedium
- 12Jump Game
LeetCode · Greedy Array Traversal+9Medium
- 12Merge Intervals
LeetCode · Interval Management / Sorting+9Medium
- 13Count Digits and Reverse NumberTakeUForward · Digit Traversal (Modulo/Division)Easy
- 13Greatest Common Divisor (GCD/HCF)TakeUForward · Euclidean AlgorithmEasy
- 13Check Palindrome and Armstrong NumberTakeUForward · Digit Reversal and Power SummationEasy
- 14Subsets (Backtracking)
LeetCode · Backtracking / DFS+9Medium
- 14Permutations (Backtracking)
LeetCode · Backtracking / State Management+9Medium
- 14Power of Two
LeetCode · Bit-Manipulation (Masking)+7Easy
- 14Single Number
LeetCode · Bit-Manipulation (XOR)+9Easy
- 15Sum of Digits (Recursive)HackerRank · Tail Recursion / ModuloEasy
- 15N-th Fibonacci Number
LeetCode · Overlapping Subproblems / Memoization+9Medium
- 15Print N to 1 and 1 to NTakeUForward · State Preservation / Pre vs. Post RecursionEasy
- 16Binary Search (Iterative & Recursive)
LeetCode · Logarithmic Search+8Easy
- 17Bubble SortCustom · Quadratic Sorting / SwappingEasy
- 19Quick Sort (Implementation)Custom · PartitioningMedium
- 20Sort Colors (Dutch National Flag)
LeetCode · Three-Way Partitioning / Two Pointers+9Medium
- 21Heap Sort (Implementation)Custom · Priority Queue / Heapify+7Medium
- 22Counting Sort (Implementation)Custom · Non-Comparison Sorting / Frequency MappingMedium
- 23Search in Rotated Sorted Array
LeetCode · Modified Binary Search+9Medium
- 24Kth Largest Element (Quickselect)
LeetCode · Quickselect / Partitioning+9Medium
- 25Sort List (Merge Sort on Linked Lists)
LeetCode · Divide and Conquer / Slow & Fast Pointers+6Medium
- 26Max Element in ArrayPractice · Linear ScanEasy
- 27Number DistributionPractice · Bucketing / BinningEasy
- 28The Missing NumberPractice · Sum Formula / XOREasy
- 29Duplicate Number in ArrayPractice · HashSet TrackingMedium
- 30Max Element in ArraySmart Interviews (Hive) · Linear ScanEasy
- 31Number DistributionSmart Interviews (Hive) · Counting + ConditionalsEasy
- 32Odd and Even SumSmart Interviews (Hive) · Linear Scan + ModuloEasy
- 33Fizz Buzz
LeetCode (412) · Simulation + Modulo+9Easy
- 34Richest Customer Wealth
LeetCode (1672) · Row Sum + Running Max+2Easy
- 35Number of Steps to Reduce a Number to Zero
LeetCode (1342) · Simulation / Bit Counting+3Easy
- 36Remove Duplicates from Sorted Array
LeetCode (26) · Two Pointers (Read/Write)+9Easy
- 37Minimum Queen Moves to Reach Target
LeetCode (4061) · Case Analysis (Geometry)Easy
- 38Transform Array Using Pair Operations
LeetCode (4062) · Invariant (Sum Preserved)Medium
- 39Longest Subarray Divisible by K with At Most One Negation I
LeetCode (4063) · Enumerate Subarrays + Modular SetMedium
- 40Remove Element
LeetCode (27) · Two Pointers (Read/Write)+7Easy
- 41Merge Strings Alternately
LeetCode (1768) · Two Pointers (Zip)+7Easy
- 42Maximum Nesting Depth of the Parentheses
LeetCode (1614) · Counter as Implicit Stack+5Easy
- 43Two Sum
LeetCode (1) · Hash Map Complement Lookup+9Easy
- 44Contains Duplicate
LeetCode (217) · Hash Set Membership+9Easy
- 45Valid Parentheses
LeetCode (20) · Stack Matching+9Easy
- 46Valid Anagram
LeetCode (242) · Frequency Counting+9Easy
- 47Group Anagrams
LeetCode (49) · Canonical Key Grouping+9Medium
- 48Valid Palindrome
LeetCode (125) · Two Pointers Inward+9Easy
- 49Binary Search
LeetCode (704) · Halving the Search Space+8Easy
- 50Reverse Linked List
LeetCode (206) · Pointer Reversal+9Easy
- 51Maximum Subarray
LeetCode (53) · Kadane's Algorithm+9Medium
- 52Product of Array Except Self
LeetCode (238) · Prefix & Suffix Passes+9Medium
- 53Longest Substring Without Repeating Characters
LeetCode (3) · Sliding Window + Set+9Medium
- 54Best Time to Buy and Sell Stock
LeetCode (121) · Track the Minimum+9Easy
- 55Kids With the Greatest Number of Candies
LeetCode (1431) · Precompute Max + Scan+3Easy
- 56Concatenation of Array
LeetCode (1929) · Build by Index / Modulo+4Easy
- 57Search Insert Position
LeetCode (35) · Binary Search+8Easy
- 58Plus One
LeetCode (66) · Scan from Right with Carry+7Easy
- 59Majority Element
LeetCode (169) · Boyer-Moore Majority Vote+9Easy
- 60Move Zeroes
LeetCode (283) · Two Pointers (Read/Write)+9Easy
- 61Longest Common Prefix
LeetCode (14) · Vertical Scanning+9Easy
- 62Shuffle the Array
LeetCode (1470) · Interleave by Index+3Easy
- 63Merge Sorted Array
LeetCode (88) · Merge from the End+9Easy
- 64Median of Two Sorted Arrays
LeetCode (4) · Binary Search / Partition+9Hard
- 65Set Mismatch
LeetCode (645) · Math / Set+4Easy
- 66Max Consecutive Ones
LeetCode (485) · Single Pass / Running Count+9Easy
- 67Greatest Common Divisor of Strings
LeetCode (1071) · GCD / Repetition Check+3Easy
- 68Top K Frequent Elements
LeetCode (347) · Bucket Sort+9Medium
- 69How Many Numbers Are Smaller Than the Current Number
LeetCode (1365) · Counting Sort / Prefix Sums+3Easy
- 70Find All Numbers Disappeared in an Array
LeetCode (448) · In-Place Marking+3Easy
- 71Is Subsequence
LeetCode (392) · Two Pointers+9Easy
- 72Remove Elements by Type and Color
LeetCode (4103) · Run Compression + StackMedium
- 73Count Valid Substrings I
LeetCode · Last Bad PositionMedium
- 74Maximum Average Subarray I
LeetCode (643) · Fixed-Size Sliding Window+7Easy
- 75Two Sum II - Input Array Is Sorted
LeetCode (167) · Two Pointers on a Sorted Array+9Medium
- 76Find the Index of the First Occurrence in a String
LeetCode (28) · KMP (Prefix Function)+9Easy
- 77Add Two Numbers
LeetCode (2) · Digit-by-Digit Addition with Carry+9Medium
- 78Length of Last Word
LeetCode (58) · Scan from the End+3Easy
- 79Contains Duplicate II
LeetCode (219) · Last-Seen Index+9Easy
- 80Reverse String
LeetCode (344) · Swap from Both Ends+9Easy
- 81Remove All Adjacent Duplicates In String
LeetCode (1047) · Stack Cancels Pairs+9Easy
- 82Intersection of Two Arrays
LeetCode (349) · Set Membership+9Easy
- 83First Missing Positive
LeetCode (41) · Cyclic Sort / In-Place Hashing+9Hard