Skip to main content

Resources

Textbooks

BookNotes
CLRS — Cormen, Leiserson, Rivest, Stein — Introduction to Algorithms (4th ed.)Primary reference. Rigorous proofs and broad coverage.
Sedgewick & WayneAlgorithms (4th ed.)More accessible; Java examples, but concepts transfer directly. algs4.cs.princeton.edu
SkienaThe Algorithm Design Manual (3rd ed.)Excellent on problem-solving intuition and the "war stories" chapters.

Kotlin References


Algorithm Visualizers


Complexity Cheat Sheet

StructureAccessSearchInsertDelete
Array\(O(1)\)\(O(n)\)\(O(n)\)\(O(n)\)
Sorted array\(O(1)\)\(O(\log n)\)\(O(n)\)\(O(n)\)
Singly linked list\(O(n)\)\(O(n)\)\(O(1)\)*\(O(1)\)*
Hash map (avg)\(O(1)\)\(O(1)\)\(O(1)\)
Binary search tree (balanced)\(O(\log n)\)\(O(\log n)\)\(O(\log n)\)
Min-heap\(O(n)\)\(O(\log n)\)\(O(\log n)\)

* Given a pointer to the node.


Tools

ToolPurpose
IntelliJ IDEARecommended IDE — first-class Kotlin support
Kotlin CLI (kotlinc)Compile & run .kt files from the terminal
draw.ioDraw trees, graphs, and flow diagrams

Style Guide

All submitted Kotlin code should follow the official Kotlin coding conventions. Key points:

  • 4-space indentation
  • camelCase for functions and variables; PascalCase for classes
  • Prefer val over var where possible
  • Keep functions short and focused — one responsibility per function