Input Array
Speed: 1x
Algorithm & Controls
Visualization
Algorithm Information: Bubble Sort
Description:
Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted.
Time Complexity:
- Best Case: O(n)
- Average Case: O(n²)
- Worst Case: O(n²)
Space Complexity:
- O(1) auxiliary space
Input Graph (Adjacency Matrix)
Graph Algorithm & Controls
Graph Visualization
Node (Unvisited)
Visited Node
Current Node
In Queue/Stack
Unvisited Edge
Traversed Edge
Shortest Path Edge
MST Edge
Graph Algorithm Information: Breadth-First Search (BFS)
Description:
BFS is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a "search key"), and explores all of the neighbor nodes at the present depth prior to moving on to the nodes at the next depth level.
Time Complexity:
- O(V + E) (for adjacency list)
- O(V²) (for adjacency matrix)
Space Complexity:
- O(V) (for queue and visited array)