🧑‍💻
CS2040S Data Structures and Algorithms
  • Algorithms
    • Overview
    • Time Complexity
    • Binary Search
  • Sorting Algorithms
  • Order Statistics
  • Interval Searching
  • Orthogonal Range Queries
  • Random Permutation Generation
  • Disjoint Set Union
  • Data Structures
    • Binary Search Tree
    • Trie
    • Hash (Symbol) Table
    • (a, b)-Trees
    • (k, d)-Trees
    • Heap
  • Graphs
    • Introduction
    • BFS and DFS
    • DAG and Topological Sort
    • SCC (Tarjan's and Kosaraju's)
    • SSSP (Bellman-Ford and Dijkstra)
    • MST (Prim's and Kruskal's)
  • Dynamic Programming
    • Concept
    • APSP Floyd-Warshall
    • Longest Increasing Subsequence
    • 0-1 Knapsack
    • Prize Collecting
    • Vertex Cover on a Tree
Powered by GitBook
On this page

Was this helpful?

  1. Algorithms

Overview

For every algorithm, it is important to understand the following:

  1. What problem does this algorithm solve?

  2. When can this algorithm be applied? (i.e., what are the preconditions? When does the algorithm fail?)

  3. Why does the algorithm give the correct answer?

  4. What is the key invariant behind this algorithm?

  5. What is the running time of the algorithm? Are there any optimisations possible?

NextTime Complexity

Last updated 8 months ago

Was this helpful?