Algorithms & Data Structures

Algorithms #

Algorithm:

Median if n is odd => i = (n+1)/2 if n is even => two medians (lower and upper median)

Linear data structures #

BNF Grammar #

Backus-Naur-Form (BNF): a metalanguage or notation technique used to describe the syntax of programming languages

Syntax:

  • Form of <nonterminal> ::= ...
  • Termninals (the symbols produced) have single quotation marks '
  • Alternatives (disjunction): |
  • Optional part: [ ]
  • Repeated zero or more times: { }

When defining a grammar we try to avoid ambiguity such that an expression can only mean one thing.

  1. Techniques
  2. Efficiency
  3. Linear Data Strucutres
  4. Trees
  5. Graphs
  6. Sorting
  7. Test
  8. KNP