{"id":35509574,"url":"https://github.com/anvaymayekar/avl-tree-visualizer","last_synced_at":"2026-01-03T21:00:33.670Z","repository":{"id":321355157,"uuid":"1085508469","full_name":"anvaymayekar/avl-tree-visualizer","owner":"anvaymayekar","description":"Interactive AVL Tree Visualizer — Real-time GUI for insert, search, and delete operations with automatic balancing, performance metrics, and visual feedback. Pure C + Win32 API.","archived":false,"fork":false,"pushed_at":"2025-11-08T16:23:26.000Z","size":11631,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-08T18:13:40.551Z","etag":null,"topics":["algorithms","avl-tree","c-programming","data-structures","dsa","gui-application","self-balancing-binary-search-tree","tree-visualization","win32api"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anvaymayekar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-29T06:14:56.000Z","updated_at":"2025-11-08T16:23:29.000Z","dependencies_parsed_at":"2025-10-29T08:27:08.136Z","dependency_job_id":"05b562bd-12c3-49bc-b02c-8a9233d2ce8d","html_url":"https://github.com/anvaymayekar/avl-tree-visualizer","commit_stats":null,"previous_names":["anvaymayekar/avl-tree-visualizer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anvaymayekar/avl-tree-visualizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anvaymayekar%2Favl-tree-visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anvaymayekar%2Favl-tree-visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anvaymayekar%2Favl-tree-visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anvaymayekar%2Favl-tree-visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anvaymayekar","download_url":"https://codeload.github.com/anvaymayekar/avl-tree-visualizer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anvaymayekar%2Favl-tree-visualizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28194266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-03T02:00:06.471Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","avl-tree","c-programming","data-structures","dsa","gui-application","self-balancing-binary-search-tree","tree-visualization","win32api"],"created_at":"2026-01-03T21:00:09.170Z","updated_at":"2026-01-03T21:00:33.660Z","avatar_url":"https://github.com/anvaymayekar.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌲 AVL Tree Visualizer\n\nA high-performance **Windows GUI application** for visualizing AVL Tree operations in real-time, built with **pure C** and the **Win32 API**. Features include live tree rendering, rotation animations, balance factor display, and microsecond-precision performance metrics.\n\n\u003e 🎓 This project was developed as part of **Data Structures and Algorithms in C** coursework at **Shah \u0026 Anchor Kutchhi Engineering College**, Mumbai by **Anvay Mayekar (SYECS1 - 26)**, under the guidance of **Professor Anita Nalawade**.\n\n---\n\n## 📸 Demo\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"sample/demo.gif\" alt=\"AVL Tree Visualizer Demo\" width=\"800\"/\u003e\n\u003c/p\u003e\n\n\n---\n\n## 📚 About AVL Trees\n\nAn **AVL tree** (named after inventors Adelson-Velsky and Landis) is a self-balancing binary search tree where the height difference between left and right subtrees of any node—called the **balance factor**—never exceeds 1. This strict balancing property ensures that operations like insertion, deletion, and search maintain **O(log n)** time complexity in all cases, preventing the tree from degrading into a linked list structure that would result in O(n) operations.\n\nWhen an insertion or deletion violates the AVL property, the tree automatically rebalances itself through **rotations**—either single (LL or RR) or double (LR or RL). These rotations are local operations that restructure subtrees without affecting the overall binary search tree ordering. This visualizer demonstrates these core concepts in real-time, allowing users to observe how balance factors update and which rotation types are triggered to maintain the tree's logarithmic height guarantee.\n\n---\n\n## ⚡ Complexity Analysis\n\n### Time Complexity\n\n| Operation   | Average Case | Worst Case | Description |\n|-------------|--------------|------------|-------------|\n| **Search**  | O(log n)     | O(log n)   | Balanced height guarantees logarithmic search |\n| **Insert**  | O(log n)     | O(log n)   | Includes rebalancing with at most 2 rotations |\n| **Delete**  | O(log n)     | O(log n)   | May require O(log n) rotations along path |\n| **Rotation**| O(1)         | O(1)       | Constant-time pointer reassignment |\n\n### Space Complexity\n\n| Aspect              | Complexity | Notes |\n|---------------------|------------|-------|\n| **Tree Storage**    | O(n)       | One node per element stored |\n| **Recursion Stack** | O(log n)   | Maximum depth for insert/delete operations |\n| **Auxiliary Space** | O(1)       | No additional data structures needed |\n\n\u003e 💡 **Key Advantage:** Unlike unbalanced BSTs that can degrade to O(n) height, AVL trees maintain a strict height bound of **1.44 × log₂(n)**, ensuring predictable performance for all operations.\n\n---\n\n## ✨ Features\n\n- **Real-time Visualization** — Watch AVL trees balance themselves dynamically\n- **Interactive Operations** — Insert, Search, and Delete with visual feedback\n- **Rotation Detection** — Identifies and displays LL, RR, LR, and RL rotations\n- **Performance Metrics** — Microsecond-precision execution time tracking\n- **Modern UI** — Clean, gradient-styled interface with node highlighting\n- **Balance Factor Display** — Shows height and BF for every node\n- **Smooth Rendering** — Double-buffered graphics with anti-aliasing\n\n---\n\n## 🗂️ Project Structure\n\n```\navl-tree-visualizer/\n├── build/                    # 🔩 Build output directory\n│   ├── obj/                  # 🧱 Compiled object files (.o)\n│   └── AVLTreeVisualizer.exe # 🟢 Windows executable\n│\n├── include/                  # 📂 Header files\n│   ├── avl_tree.h           # 🌳 AVL tree data structures \u0026 operations\n│   └── common.h             # 🎨 Constants, colors, window dimensions\n│\n├── src/                      # ⚙️  Source implementation\n│   ├── avl_tree.c           # 🧮 Core AVL logic (insert, delete, rotate)\n│   ├── gui.c                # 🖼️  Rendering \u0026 visualization\n│   └── main.c               # 🚀 Entry point \u0026 event handling\n│\n├── sample/                   # 📸 Demo screenshots\n│   └── demo.png\n│\n├── Makefile                  # 🔨 Build automation\n└── README.md                 # 📘 Project documentation\n```\n\n---\n\n## 🧰 Technologies Used\n\n![C](https://img.shields.io/badge/C_Language-00599C?style=for-the-badge\u0026logo=c\u0026logoColor=white)\n![Win32 API](https://img.shields.io/badge/Win32_API-0078D6?style=for-the-badge\u0026logo=windows\u0026logoColor=white)\n![GDI+](https://img.shields.io/badge/GDI+-Graphics-blue?style=for-the-badge)\n![GCC](https://img.shields.io/badge/GCC-Compiler-A8B9CC?style=for-the-badge\u0026logo=gnu\u0026logoColor=white)\n\n---\n\n## 📦 Installation \u0026 Setup\n\n### Prerequisites\n\n- **Windows OS** (Win32 API dependency)\n- **GCC Compiler** (MinGW recommended)\n- **Make** (for build automation)\n\n### 🔧 Build Instructions\n\n```bash\n# Clone the repository\ngit clone https://github.com/anvaymayekar/avl-tree-visualizer.git\n\n# Navigate to project directory\ncd avl-tree-visualizer\n\n# Build the project\nmake\n\n# Run the executable\n./build/AVLTreeVisualizer.exe\n```\n\n### 🧹 Clean Build\n\n```bash\nmake clean\n```\n\n---\n\n## 🎮 Usage\n\n1. **Insert Node** — Enter a value and click \"Insert\" or press `Enter`\n2. **Search Node** — Input a value and click \"Search\" or press `F3`\n3. **Delete Node** — Enter a value and click \"Delete\" or press `Delete`\n\n### Keyboard Shortcuts\n\n| Key          | Action        |\n|--------------|---------------|\n| `Enter`      | Insert Node   |\n| `F3`         | Search Node   |\n| `Delete`     | Delete Node   |\n\n---\n\n## 🧮 AVL Operations\n\n| Operation   | Time Complexity | Space Complexity |\n|-------------|-----------------|------------------|\n| Insert      | O(log n)        | O(1)             |\n| Delete      | O(log n)        | O(1)             |\n| Search      | O(log n)        | O(1)             |\n| Rotation    | O(1)            | O(1)             |\n\n---\n\n## 🎨 Visual Features\n\n- **Node Highlighting** — Green for found nodes, red for rotations\n- **Balance Factors** — Displayed inside each node\n- **Tree Height** — Real-time height calculation\n- **Rotation Tracking** — Shows LL/RR/LR/RL rotation types\n- **Performance Stats** — Execution time in milliseconds\n\n---\n\n## ⚖️ License\n\nThis project is licensed under the [MIT License](https://opensource.org/licenses/MIT).  \nYou are free to use, modify, and distribute this software with proper attribution.\n\n---\n\n## 👨‍💻 Author\n\n\u003e **Anvay Mayekar**  \n\u003e 🎓 B.Tech in Electronics \u0026 Computer Science — SAKEC  \n\u003e  \n\u003e [![GitHub](https://img.shields.io/badge/GitHub-181717.svg?style=for-the-badge\u0026logo=GitHub\u0026logoColor=white)](https://www.github.com/anvaymayekar)\n\u003e [![LinkedIn](https://img.shields.io/badge/LinkedIn-0A66C2.svg?style=for-the-badge\u0026logo=LinkedIn\u0026logoColor=white)](https://in.linkedin.com/in/anvaymayekar)\n\u003e [![Gmail](https://img.shields.io/badge/Gmail-D14836.svg?style=for-the-badge\u0026logo=gmail\u0026logoColor=white)](mailto:anvaay@gmail.com)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanvaymayekar%2Favl-tree-visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanvaymayekar%2Favl-tree-visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanvaymayekar%2Favl-tree-visualizer/lists"}