(Tutorial) Data Structure Visualizations


Data Structure Visualizations

Visualizations for the following data structures and algorithms:

  • Stacks (both array and linked list implementations)
  • Queues (both array and linked list implementations)
  • Lists (both array and linked list implementations. Visitors are also demonstrated)
  • Binary Search Trees
  • AVL Trees
  • B-Trees
  • Heaps
  • Binomial Queues
  • Hash Tables
  • Separate Chaining (Open Hashing, Closed Addressing)
  • Closed Hashing (Open Addressing) -- including linear probling, quadratic probing, and double hashing.
  • Both integers and strings as keys (with a nice visualziation of elfhash for strings)
  • Sorting Algorithms
    • Bubble Sort
    • Selection Sort
    • Insertion Sort
    • Shell Sort
    • Merge Sort
    • Quck Sort
    • Heap Sort
    • Counting Sort
    • Bucket Sort
    • Radix Sort
  • Huffman Coding
  • Graph Alogrithms
    • Dijkstra's Algorithm
    • Prim's Algorithm
    • Kruskals Algorithm (including a visualization of disjoint sets)
    • Breadth-First Search
    • Depth-First Search
    • Connected Components
    • Topological Sort
    • Floyd-Warshall (all pairs shortest paths)
  • Dynamic Programming
    • Calculating nth Fibonacci number
    • Making Change
    The best way to understand complex data structures is to see them in action.  
  • Screenshots:

    To really experience this tool, you should download it for yourself and see it in action. (At a mere 530k, the .jar file is not much larger than a couple screenshots.) However, the following screenshots are offered for your viewing enjoyment. Click on a thumbnail for a larger view:


    Dijkstra Screenshot
    Dijkstra's algorithm
    Small Graph
    Logical Represntation
    Dijkstra Screenshot
    Dijkstra's algorithm
    Large graph
    Adjacently List
    Quicksort Screenshot
    Quicksort Screenshot
    Radix Sort


    Current version: 1.05

    • visualization.jar Everythig you need in a handy java .jar file
      (If your browser is confused by the .jar extension, then right click, choose "save as", and save to your local machine)
    • Source code: projects.tar.gz All wrapped up in a tar'ed gzipped file. WARNING! This code can be a little confusing, and the algorithms are obscured by the visualizations. Do not look at the source to understand the algorithms!

    How to use the visualizations:

    • OS X
      Download to your local machine, and then double-click on the downloaded file. As with most Mac things, it just works.
    • Linux
      Download to your local machine. From the directory where you've downloaded the file, type "java -jar visualization.jar". Assuming that java is correctly installed on your machine and your CLASSPATH and such are set up correctly, this should work just fine. In most distributions (redhat/etc), there don't seem to be any problems.
    • Windows
      Download to your local machine, and then double-click on the downloaded file. As with most Windows things, it seems to work most of the time :)

    Courtesy: cs.usfca.edu

    comments powered by Disqus