Abstract AlgorithmsAbstract Algorithms

  • Home
  • All Posts
  • All Series
  • About

Category

sorting

1 article

Cyclic Sort: Find Missing and Duplicate Numbers in O(n) Time, O(1) Space

TLDR: If an array holds n numbers in range [1, n], each number belongs at index num - 1. Cyclic sort places every element at its correct index in O(n) time using O(1) space — then a single scan reveals every missing and duplicate number. Five intervi...

Mar 29, 2026•16 min read

Abstract Algorithms

Exploring the fascinating world of algorithms, data structures, and software engineering through clear explanations and practical examples.

Navigation

  • Home
  • All Posts
  • All Series
  • About

Series

  • How It Works: Internals Explained
  • System Design Interview Prep
  • Data Structures and Algorithms
  • LLM Engineering
  • Machine Learning Fundamentals

Popular Topics

  • data structures
  • algorithms
  • coding interview
  • Java
  • Heaps
  • caching

Author

Abstract Algorithms

Abstract Algorithms

@abstractalgorithms

1 followers on Hashnode

© 2026 Abstract Algorithms. All rights reserved.

Powered by Hashnode