Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

66 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚠️ WIP

🧠 Algorithms Playground

A collection of algorithm implementations in TypeScript, focusing on clarity, performance, and well-known problem-solving patterns.


πŸ“š Algorithms & Data Structures

Sorting Algorithms

Array & Searching Techniques

Binary Search Family

Two-Pointer Techniques

Hash Map Patterns

Sliding Window Patterns

Binary Algorithms

  • πŸ”— Missing Number - Find the missing number in array containing n distinct numbers in range [0, n] (O(n) time, O(1) space)

Tree Data Structures

Binary Search Tree

  • πŸ”— Binary Tree Implementation - Binary search tree with insert, search, and traversal operations
    • Insert values maintaining BST property (O(log n) average, O(n) worst case)
    • Search for values efficiently (O(log n) average, O(n) worst case)
    • In-order traversal returning sorted values (O(n) time)
  • πŸ”— Build Binary Tree from Traversals - Reconstruct a binary tree from pre-order/post-order and in-order traversal sequences

Stack Data Structures

Heap Data Structures

  • πŸ”— Min Heap - Min heap implementation with insert and popMin operations using heapify up/down (O(log n) insert/extract)

Trie Data Structure

  • πŸ”— Trie - Prefix tree implementation with insert, search, and startsWith operations

Linked List Algorithms & Data Structures

Core Data Structures

Linked List Algorithms

Utilities


πŸ›  Tech Stack

  • TypeScript - Type-safe algorithm implementations
  • Bun - Fast JavaScript runtime and test runner
  • Biome - Code formatting and linting

πŸš€ Getting Started

# Install dependencies
bun install

# Run all tests
bun test

# Run tests in watch mode
bun test --watch

# Format code
bunx biome format --write

# Lint code
bunx biome lint --write

πŸ“„ License

MIT License

About

A collection of algorithm implementations in TypeScript, focusing on clarity, performance, and well-known problem-solving patterns.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages