🐻
berkeley
  • #Despair
  • 16A/B
    • Thevenin and Norton Equivalence
    • Resistive Touchscreen
    • Trilateration and Correlation
    • RC Circuits & Transient Analysis
  • 61B
    • Testing
    • References in Java
    • Linked Lists in Java
    • Implementation Inheritance
    • Comparables and Iterators
    • Casting
    • Lists and Sets
    • Asymptotics
    • Trees
    • Hashing
    • PriorityQueue and Heap
    • Graphs, Tree Traversals
    • Tries
    • Sorting
  • Discrete Mathematics
    • Sets + Mathematical Notation
    • Logic and Proofs
    • Induction
    • Cryptography/RSA
    • Modular Arithmetic
    • Discrete Probability
  • Linear Algebra
    • Linear Equations
    • Matrix Algebra
    • Determinants
    • Vector Spaces
    • Eigenvectors and Eigenvalues
    • Projections and Orthogonality
    • SVD/PCA
  • Math 275 — Ordinary Differential Equations
    • Math 275 — Overview
    • Modeling via Differential Equations
    • Linear Systems
  • INTEGBI 35AC
    • Humans Came From Fish
    • Evolution's History
    • Typology
    • The Human Diaspora
  • 170
    • Basics
    • Divide and Conquer
    • Fast Fourier Transform
    • Graphs
    • Greedy
  • 61C
    • Pointers and Memory
    • Floating Point
    • Compliation, Assembly, Linking, Loading
    • RISC-V, Assembly
Powered by GitBook
On this page
  • Huffman Encoding
  • Prefix Free Encoding
  • Union Find

Was this helpful?

  1. 170

Greedy

Greedy algorithms build a solution iteratively using a sequence of local choices — it's another method of algorithm solving.

Huffman Encoding

Suppose you have an alphabet Σ\SigmaΣ, and a text that use characters that come from Σ\SigmaΣ. The frequency of any given character is the number of times it ocurrs. We want to find an unambiguous way for encoding the string.

Prefix Free Encoding

In order to encode our string in such a way that it is not ambiguous, we can just encode it such that no character's encoding is a prefix of any other character's encoding.

Union Find

PreviousGraphsNextPointers and Memory

Last updated 3 years ago

Was this helpful?