Skip to main content
← All Tags

Interview

7 articles in this category

AlgorithmsInterviewArray Manipulation

Product of Array Except Self: Division-Free Array Manipulation

Learn how to compute products of all elements except the current one without using division. Master the prefix-suffix pattern that appears in countless array problems and understand why O(n) with O(1) space is achievable.

Read more
AlgorithmsInterviewDynamic Programming

Maximum Subarray: Kadane's Algorithm and the Art of Local vs Global Optimization

Discover how Kadane's algorithm finds the maximum sum subarray in O(n) time. Learn why tracking local maximums leads to global solutions, and how this pattern applies far beyond array problems.

Read more
AlgorithmsInterviewSliding Window

Longest Substring Without Repeating Characters: The Sliding Window Technique

Master the sliding window pattern through one of its most elegant applications. Learn how to find the longest substring without repeating characters in O(n) time using a hash set and two pointers.

Read more
AlgorithmsInterviewHash Maps

Two Sum: The First Step Into Algorithmic Problem Solving

Master the Two Sum problem with a hash map solution. Learn how to transform a brute force O(n²) approach into an elegant O(n) algorithm, and why this problem appears in nearly every coding interview.

Read more
AlgorithmsInterviewDynamic Programming

Best Time to Buy and Sell Stock: Finding Profit in a Single Pass

Learn how to find the maximum profit from a single stock transaction with an elegant O(n) solution. Discover why tracking the minimum price is the key insight that transforms this problem from complex to simple.

Read more
AlgorithmsInterviewHeap

Top K Frequent Elements: Finding Signal in the Noise

Master the Top K Frequent problem with practical heap-based and optimized solutions. Learn when to use max heaps vs min heaps, and why this matters for real-world data analysis.

Read more
AlgorithmsInterviewDFS

Flood Fill Algorithm - The Paint Bucket Tool Explained

Implement flood fill using DFS. Learn the key optimization: use color changes as implicit visited marking to eliminate the need for a separate Set. Includes iterative and recursive solutions with real trade-offs.

Read more