Algo_Simulator_Svelte Svelte Themes

Algo_simulator_svelte

Big O Visualizer šŸŒ

https://algo-simulator-svelte-qcws.vercel.app/

An amazing cheat sheet if you want to understand Big O: https://www.bigocheatsheet.com/

What is Big O Notation? šŸ¤”

This is a app I created to understand algorithims for fun. This is a simplified version of a bigger topic.

Quick Summary:

Big O Notation is a mathematical representation of an algorithm's efficiency. It describes how the runtime or space requirements of an algorithm grow relative to the input size. The most common complexities include:

  • O(1): Constant time ā€” performance remains the same regardless of input size.
  • O(log n): Logarithmic time ā€” performance grows slowly as input size increases.
  • O(n): Linear time ā€” performance grows directly proportional to input size.
  • O(n log n): Linearithmic time ā€” often seen in efficient sorting algorithms like mergesort.
  • O(nĀ²): Quadratic time ā€” performance grows rapidly; common in nested loops.
  • O(2āæ): Exponential time ā€” extremely inefficient for large inputs; common in brute-force solutions.

Understanding these complexities helps developers write efficient code and make informed decisions about algorithm selection.


Tech Stack

Key Files

  • App.svelte: The main component handling user interactions and graph rendering.
  • calculateBigO.js: Implements the logic for calculating Big O values for the selected algorithm and input size.

Getting Started šŸ

1. Clone the Repository

git clone <repository-url>
cd <project-folder>
npm install
npm run dev  

Top categories

Loading Svelte Themes