All Posts - Algorithms

Reverse Linked List in Dart ā Iterative (Optimal) & More
Solve Reverse Linked List in Dart with working code. Iterative (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
April 09, 2026

Reverse Linked List in Go ā Iterative (Optimal) & More
Solve Reverse Linked List in Go with working code. Iterative (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
April 09, 2026

Reverse Linked List in Python ā Iterative (Optimal) & More
Solve Reverse Linked List in Python with working code. Iterative (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
April 09, 2026

Reverse Linked List in Swift ā Iterative (Optimal) & More
Solve Reverse Linked List in Swift with working code. Iterative (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
April 09, 2026

Maximum Subarray in Dart ā Kadane's Algorithm (Optimal) & More
Solve Maximum Subarray in Dart with working code. Kadane's Algorithm (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
October 23, 2025

Maximum Subarray in Go ā Kadane's Algorithm (Optimal) & More
Solve Maximum Subarray in Go with working code. Kadane's Algorithm (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
October 23, 2025

Maximum Subarray in Python ā Kadane's Algorithm (Optimal) & More
Solve Maximum Subarray in Python four ways ā Kadane's O(n) algorithm, brute force, divide-and-conquer, and index tracking ā with interview tips.
October 23, 2025

Maximum Subarray in Swift ā Kadane's Algorithm (Optimal) & More
Solve Maximum Subarray in Swift with working code. Kadane's Algorithm (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
October 23, 2025

Remove Duplicates from Sorted Array in Go ā Two Pointers & More
Solve Remove Duplicates from Sorted Array in Go with working code. Two Pointers (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
August 29, 2024

Remove Duplicates from Sorted Array in Dart ā Two Pointers & More
Solve Remove Duplicates from Sorted Array in Dart with working code. Two Pointers (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
August 29, 2024

Remove Duplicates from Sorted Array in Python ā 3 Ways
Safely remove duplicates in-place from a sorted array in Python. 3 approaches: two-pointers, slow-fast index tracking, and set-based shortcut, with complexity analysis.
August 29, 2024

Remove Duplicates from Sorted Array in Swift ā Two Pointers
Solve Remove Duplicates from Sorted Array in Swift with working code. Two Pointers (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
August 29, 2024

Linked List Cycle in Dart ā Floyd's Tortoise & Hare & More
Solve Linked List Cycle in Dart with working code. Floyd's Tortoise & Hare (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
May 01, 2024

Linked List Cycle in Go ā Floyd's Tortoise & Hare & More
Solve Linked List Cycle in Go with working code. Floyd's Tortoise & Hare (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
May 01, 2024

Linked List Cycle in Python ā Floyd's Tortoise & Hare
Detect a cycle in a linked list two ways ā hash set tracking and Floyd's Tortoise and Hare (fast/slow pointers) ā with code and a dry run.
May 01, 2024

Linked List Cycle in Swift ā Floyd's Tortoise & Hare & More
Solve Linked List Cycle in Swift with working code. Floyd's Tortoise & Hare (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
May 01, 2024

Count Nice Pairs in Dart ā Modular Arithmetic Trick
Count nice pairs in an array in Dart. Learn the modular arithmetic trick that turns O(n²) into O(n) using hash maps, with full code and tests.
January 14, 2024

Contains Duplicate in Go ā Hash Set (Optimal) & More
Solve Contains Duplicate in Go with working code. Hash Set (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
January 08, 2024

Contains Duplicate in Dart ā Hash Set (Optimal) & More
Solve Contains Duplicate in Dart with working code. Hash Set (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
January 08, 2024

Contains Duplicate in Python: Set vs Dictionary vs Sorting
3 ways to detect duplicate elements in a Python array ā set-based, dictionary-based, and sorting approaches compared with complexity analysis.
January 08, 2024

Contains Duplicate in Swift ā Hash Set (Optimal) & More
Solve Contains Duplicate in Swift with working code. Hash Set (Optimal) approach with O(n) time, plus complexity analysis and interview tips.
January 08, 2024