Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Arshanhp/RBTree-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”΄βš« Red-Black Tree Visualizer

The Most Complete CLRS Red-Black Tree Educational Tool

Python Tkinter License CLRS Version


A fully animated, step-by-step Red-Black Tree visualizer built for students, educators, and algorithm enthusiasts. Implements exact CLRS pseudocode with real-time animation, case explanations, and multi-format export.


RBTree Visualizer β€” Dark & Light Splash Screen

πŸ“Έ Screenshots

πŸ—οΈ Build Mode β€” Dark & Light Theme

Build Mode β€” Dark and Light Theme



πŸ“– CLRS Pseudocode Panel

CLRS Pseudocode with Line-by-Line Sync & Case Explanations



πŸ“Š Analyze Mode

Analyze Mode β€” BST vs RB-Tree Comparison



πŸ“¦ Export Options β€” PDF Β· PNG Β· MP4

Multi-Format Export: PDF, PNG, MP4 Video



🎬 Animation Demo

Step-by-Step Insertion Animation

✨ Features

πŸ—οΈ Build Mode β€” Interactive Tree Construction

Feature Description
🎬 Step-by-Step Animation Watch every insert / delete operation unfold one step at a time
πŸ“– CLRS Pseudocode Exact pseudocode from Introduction to Algorithms (4th ed.), synced line-by-line
πŸ“‹ Case Explanations Detailed breakdown of Insert Cases (0–3) and Delete Cases (0–4)
πŸ”„ Rotations Visualized See LEFT-ROTATE and RIGHT-ROTATE happen in real time
⏱️ Timeline Scrubber Jump to any step Β· rewind Β· fast-forward β€” full VCR control
πŸ” Zoom & Pan Scroll to zoom, drag to pan β€” explore large trees easily
πŸ“Š Live Stats Node count Β· black-height Β· tree height β€” updated in real time
πŸ“ Operation Log Full history of every operation with clickable replay

πŸ“Š Analyze Mode β€” Comparison & Validation

Feature Description
πŸ“ˆ BST vs RB-Tree Side-by-side height and structure comparison
🎲 Random Generation Generate trees with N random keys instantly
βœ… Property Validation Verify all 5 Red-Black Tree properties
πŸ”¬ Performance Visualize how RB-Trees maintain $O(\log n)$ height

πŸ“¦ Export Options

Format What You Get
πŸ“„ PDF Full step-by-step walkthrough with pseudocode & case explanations
πŸ–ΌοΈ PNG High-resolution snapshot of current tree state
πŸŽ₯ MP4 Animated video of the entire operation sequence

🎨 Themes

πŸŒ™ Dark Catppuccin Mocha β€” easy on the eyes
β˜€οΈ Light Catppuccin Latte β€” clean and bright
βš™οΈ Settings Customize animation speed, node colors, and theme

πŸ—οΈ Architecture

About

🌳 Interactive Red-Black Tree Visualizer β€” Animated CLRS Insert & Delete with step-by-step rotations & recoloring | Analyze Mode: find ALL insertion orders for any target tree via permutation search | Pseudocode sync, Dark/Light theme, PNG/PDF/MP4 export | Python

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages