Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 965 Bytes

File metadata and controls

19 lines (15 loc) · 965 Bytes

Algorithm Implementation

This module contains implementations of common algorithm patterns and data structures.

Contents

  • Binary Search: Binary search algorithm implementation
  • Breadth First Search (BFS): Tree traversal using BFS
  • Depth First Search (DFS): Tree traversal using DFS
  • Cycle Sorting: Pattern for dealing with arrays containing numbers in a given range
  • Fast and Slow Iterators: Two-pointer technique for linked lists (cycle detection, removal)
  • In-Place LinkedList Reversal: Reversing linked lists without extra space
  • Merge Intervals: Finding intersections and merging intervals
  • Sliding Window: Pattern for finding subarrays/substrings with specific properties
  • Subset: Generating subsets of arrays
  • Top K Elements: Finding largest/smallest K elements using heaps
  • Two Heap: Using two heaps for median finding
  • Two Iterators: Two-pointer technique for arrays (squares, three sum)