Skip to content
Viki's Corner
200. Number of Islands (Approach 2)
Initializing search
Vikramadtya/study-saathi
Home
Algorithmic Patterns
Design Patterns
System Design
Notes
Code Scratch
Viki's Corner
Vikramadtya/study-saathi
Home
Algorithmic Patterns
Algorithmic Patterns
Sort
Sort
Macro Syntax Error
Counting Sort
Insertion Sort
Merge Sort
Pigeon Hole Sort
Quick Sort
Selection Sort
Binary Search
Arrays
Arrays
Macro Syntax Error
Boyer Moore majority vote algorithm
Kadane’s Algorithm
Triple Reverse algorithm aka Reversal Algorithm
Linked list
Linked list
Cycle Detection
Macro Syntax Error
Sorting
Stack
Stack
Monotonic Stack
Macro Syntax Error
Monotonic Stack
Reversing an Array
Stack
Tower of Hanoi
Queue
Queue
Deques
Priority Queue
Queue
Heap
Heap
Binary Heap
Binomial Heap
Macro Syntax Error
Tree
Tree
Macro Syntax Error
Centre of gravity
Diameter of Tree
Shortest Path
Graph
Graph
Cycle detection
Macro Syntax Error
Macro Syntax Error
Macro Syntax Error
Partitioning
Partitioning
Max Consecutive Ones
Hoare's Partition Scheme
Lomuto partition Scheme
Numerical algorithms
Numerical algorithms
Finding If Number is Prime
Macro Syntax Error
Performing Exponentiation
Macro Syntax Error
Macro Syntax Error
Miscellaneous
Miscellaneous
Macro Syntax Error
Rotate array by K steps
Design Patterns
Design Patterns
Table of contents
Don't Repeat Yourself (DRY) Principle
Keep it Simple, Stupid (KISS) Principle
You Aren't Gonna Need It (YAGNI) Principle
Class Design
Design pattern
Solid
Solid
Macro Syntax Error
Macro Syntax Error
Macro Syntax Error
Macro Syntax Error
Macro Syntax Error
System Design
System Design
About
Vertical vs Horizontal Scaling
Database Selection
Database Scaling
Load Balancing
Stateless vs Stateful Systems
Notes
Notes
Docker
Docker
🐳 Docker Foundation: Concepts & Architecture
Basic Docker Commands
Misc
Misc
Java
Java
Java/JVM architecture
Java Object Anatomy: What lives in Memory?
The Java Dev Environment That Just Works
Understanding the Servlet Ecosystem: From Tomcat to Micronaut
Network
Network
DNS
HTTP
IP Address
The OSI Model
TCP/IP
Others
Others
Examples
Resources
Logs
Java
Java
Arrays
Data Structures
List
Math Operation
Binary Search
Sorting
String Operation
Code Scratch
Code Scratch
LeetCode Solutions
LeetCode Solutions
Easy
Easy
Macro Syntax Error
118. Pascal's Triangle
121. Best Time to Buy and Sell Stock
13. Roman to Integer
14. Longest Common Prefix
1431. Kids With the Greatest Number of Candies
1614. Maximum Nesting Depth of the Parentheses
1752. Check if Array Is Sorted and Rotated
1768. Merge Strings Alternately
1903. Largest Odd Number in String
20. Valid Parentheses
205. Isomorphic Strings
242. Valid Anagram
26. Remove Duplicates from Sorted Array
283. Move Zeroes
2965. Find Missing and Repeated Values
345. Reverse Vowels of a String
35. Search Insert Position
605. Can Place Flowers
69. Sqrt(x)
70. Climbing Stairs
704. Binary Search
796. Rotate String
88. Merge Sorted Array
Medium
Medium
1011. Capacity To Ship Packages Within D Days
11. Container With Most Water
1101. The Earliest Moment When Everyone Become Friends
1283. Find the Smallest Divisor Given a Threshold
138. Copy List with Random Pointer
Macro Syntax Error
150. Evaluate Reverse Polish Notation
151. Reverse Words in a String
153. Find Minimum in Rotated Sorted Array
155. Min Stack
162. Find Peak Element
Macro Syntax Error
17. Letter Combinations of a Phone Number
19. Remove Nth Node From End of List
198. House Robber
2. Add Two Numbers
207. Course Schedule
2140. Solving Questions With Brainpower
215. Kth Largest Element in an Array
22. Generate Parentheses
227. Basic Calculator II
236. Lowest Common Ancestor of a Binary Tree
237. Delete Node in a Linked List
Macro Syntax Error
3. Longest Substring Without Repeating Characters
3169. Count Days Without Meetings
33. Search in Rotated Sorted Array
34. Find First and Last Position of Element in Sorted Array
3481. Apply Substitutions
451. Sort Characters By Frequency
48. Rotate Image
49. Group Anagrams
5. Longest Palindromic Substring
50. Pow(x, n)
Macro Syntax Error
54. Spiral Matrix
540. Single Element in a Sorted Array
56. Merge Intervals
560. Subarray Sum Equals K
61. Rotate List
636. Exclusive Time of Functions
73. Set Matrix Zeroes
74. Search a 2D Matrix
75. Sort Colors
78. Subsets
8. String to Integer (atoi)
875. Koko Eating Bananas
189. rotate array approach 1
189. rotate array approach 1
189. Rotate Array (Approach 2 )
200. number of islands approach 1
200. number of islands approach 1
200. Number of Islands (Approach 2)
200. Number of Islands (Approach 2)
Table of contents
Intuition
253. meeting rooms ii approach 1
253. meeting rooms ii approach 1
Approach Using Priority Queue
Hard
Hard
121. Best Time to Buy and Sell Stock
122. Best Time to Buy and Sell Stock II
189. Rotate Array
25. Reverse Nodes in k-Group
26. Remove Duplicates from Sorted Array
27. Remove Element
274. H-Index
42. Trapping Rain Water
51. N-Queens
55. Jump Game
80. Remove Duplicates from Sorted Array II
88. Merge Sorted Array
Misc
Misc
Calculate Floor & Ceiling
Find Nth Root Of M
Flatten A Linked List
Implement Lower Bound
Implement Upper Bound
Number of occurrence
TakeUForward Solutions
TakeUForward Solutions
Sorting
Sorting
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Selection Sort
Arrays
Arrays
Fundamentals
Fundamentals
Largest Element in an Array
Rotate Array Left by K
Rotate Array Left by One
Linear Search
Max Consecutive Ones
Second Largest Element in an Array
Logic Building
Logic Building
Missing Number
Intersection of Two Sorted Arrays (with Duplicates)
Move Zeroes
Remove Duplicates from Sorted Array
Union of Two Sorted Arrays
FAQs (Medium)
FAQs (Medium)
3Sum: The Sorting + Two-Pointer Pattern
4Sum: The k-Sum Reduction Pattern
Maximum Subarray (Kadane's Algorithm)
Leaders in an Array
Majority Element (Boyer-Moore Voting)
Pascal's Triangle: Find a Specific Element
Generate Pascal's Triangle (Full)
Macro Syntax Error
Rearrange Array Elements by Sign
Rotate Image (90° Clockwise)
Sort Colors (Dutch National Flag Problem)
Two Sum: The Complement Pattern
FAQS (Hard)
FAQS (Hard)
Find the repeating and missing number
Merge two sorted arrays without extra space
Hashing
Hashing
Theory
FAQs
FAQs
Count subarrays with given sum
Count subarrays with given xor K
Longest Consecutive Sequence in an Array
Longest subarray with sum K
Binary Search
Binary Search
Theory
Fundamentals
Fundamentals
Lower Bound (The Transition Point Pattern)
Binary Search (The Gold Standard)
Upper Bound (The "First Greater" Pattern)
Logic Building
Logic Building
Find Minimum in Rotated Sorted Array
Number of Rotations in Sorted Array
Find First and Last Position of Element
Floor and Ceil in a Sorted Array
Search in Rotated Sorted Array
Search in Rotated Sorted Array II (With Duplicates)
Search Insert Position
Single Element in a Sorted Array
On answers
On answers
Nth Root of M
Floor Square Root
Smallest Divisor Given a Threshold
Koko Eating Bananas (Minimum Rate)
Minimum Days to Make M Bouquets
Recursion
Recursion
Implementation Problems
Implementation Problems
Generate Parentheses
Power Function: pow(x, n)
Subsets (The Power Set)
Subsequence Pattern Problems
Subsequence Pattern Problems
Subsequence Sum Existence
Count all subsequences with sum K
Table of contents
Intuition
200. Number of Islands (Approach 2)
¶
Intuition
¶
Comments
Back to top