Skip to content

suber-IQ/dsa-visualizer

Repository files navigation

🌟 DSA-Visualizer 🌟

dsa-visualizer

🚀 Introduction

DSA-Visualizer is an interactive and educational tool designed to help users understand and visualize fundamental Data Structures and Algorithms (DSA). This project provides an engaging way to explore sorting, searching, graph algorithms, dynamic programming, greedy techniques, backtracking, tree algorithms, and mathematical computations.

🎯 Features

Interactive Visualizations – See step-by-step execution of algorithms.
User-Friendly Interface – Easy-to-navigate UI with real-time animations.
Performance Metrics – Analyze time complexity and execution speed.
Code Snippets – Each algorithm includes well-documented code.
Custom Inputs – Users can enter their own test cases.
Educational Purpose – Designed for students, educators, and DSA enthusiasts.


📌 Algorithms Implemented

🔷 1. Sorting Algorithms

Sorting algorithms arrange elements in a particular order.

  • 🟢 Bubble Sort – A simple comparison-based algorithm.
  • 🟢 Selection Sort – Repeatedly selects the smallest element.
  • 🟢 Insertion Sort – Efficient for small datasets.
  • 🔵 Merge Sort – A divide-and-conquer approach.
  • 🔵 Quick Sort – Uses partitioning to sort efficiently.

🔶 2. Searching Algorithms

Searching algorithms help in finding an element in a dataset.

  • 🔍 Linear Search – Iterates through the list sequentially.
  • 🔍 Binary Search – Uses a divide-and-conquer strategy (requires sorted input).

🔷 3. Graph Algorithms

Graph-based techniques are widely used in networking, maps, and AI.

  • 🟣 BFS (Breadth-First Search) – Explores neighbors before deeper nodes.
  • 🟣 DFS (Depth-First Search) – Explores as far as possible before backtracking.
  • 🟣 Dijkstra’s Algorithm – Finds the shortest path in weighted graphs.
  • 🟡 Prim’s Algorithm – Constructs a minimum spanning tree.
  • 🟡 Kruskal’s Algorithm – Another method for minimum spanning tree construction.

🔶 4. Dynamic Programming

Optimized solutions by breaking problems into subproblems.

  • 🔢 Fibonacci Sequence – Uses memoization for efficiency.
  • 🎒 Knapsack Problem – Optimizes item selection for maximum value.
  • 📖 Longest Common Subsequence (LCS) – Finds the longest matching sequence.
  • 📈 Longest Increasing Subsequence (LIS) – Determines the longest ascending subsequence.

🔷 5. Greedy Algorithms

Algorithms that make the best local choice at each step.

  • Activity Selection Problem – Selects maximum non-overlapping activities.
  • 🗜 Huffman Coding – Used in data compression for optimal encoding.

🔶 6. Backtracking

A trial-and-error approach to explore all possible solutions.

  • N-Queens Problem – Places N queens on an NxN chessboard.
  • 🧩 Sudoku Solver – Solves Sudoku puzzles using constraint satisfaction.

🌳 7. Tree Algorithms

Tree structures are fundamental to hierarchical data representation.

  • 🌿 Tree Traversals – Preorder, Inorder, Postorder traversals.
  • 🌳 Binary Search Tree (BST) Operations – Insert, delete, search.
  • 🔄 AVL Tree Rotations – Self-balancing BST with rotation operations.
  • 🔍 Lowest Common Ancestor (LCA) – Finds the closest common ancestor of two nodes.

🔢 8. Mathematical Algorithms

Mathematical computations and number theory algorithms.

  • 🔢 GCD (Greatest Common Divisor) - Euclidean Algorithm – Efficient GCD computation.
  • 🧮 Sieve of Eratosthenes – Finds all prime numbers up to a given limit.
  • 🧩 Prime Factorization – Determines prime factors of a number.

🛠 Installation

To run DSA-Visualizer locally:

# Clone the repository
git clone https://github.com/suber-IQ/dsa-visualizer.git

# Navigate to the project directory
cd DSA-Visualizer

# Install dependencies (if applicable)
pnpm install  # For JavaScript-based projects

🎮 Usage

  1. Launch the application:
    pnpm start   # For JavaScript-based projects
  2. Select an algorithm from the UI.
  3. Input custom data or use predefined examples.
  4. Observe step-by-step visualizations.

🔧 Technologies Used

  • Programming Languages: JavaScript
  • Frontend: React.js, Typescript, Tailwind Css
  • Data Structures: Sorting,Searching,Graph,Dp,Tree etc..

🤝 Contributing

🎉 Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature-branch.
  3. Commit your changes: git commit -m 'Added new feature'.
  4. Push to the branch: git push origin feature-branch.
  5. Submit a pull request.

📬 Contact

For queries or suggestions: 📧 Email: suberquercusumit@gmail.com
🔗 GitHub: suberiq


About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages