1/30
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Best time complexity Linear search
O(1)
Average time complexity linear search
O(n)
Worst time complexity linear search
O(n)
Best time complexity binary search array
O(1)
Average time complexity binary search array
O(log n)
Worst time complexity Binary search array
O(log n)
Best time complexity binary search tree
O(1)
Average time complexity Binary search tree
O(log n)
Worst time complexity Binary search tree
O(n)
Best time complexity hashing
O(1)A
Average time complexity Hashing
O(1)
Worst time complexity hashing
O(n)
Best time complexity Breadth/depth first of a graph
O(1)
Average time complexity Breadth/depth first of a graph
O(V+E) No. Vertices + No. edges
Worst time complexity Breadth/depth first of a graph
O(V2)
Bubble sort best time complexity
O(n)
Bubble sort average time complexity
O(n²)
Bubble sort worst time complexity
O(n²)
Bubble sort space complexity
O(1)
Insertion sort best time complexity
O(n)
Insertion sort average time complexity
O(n²)
Insertion sort worst time complexity
O(n2)
Insertion sort space complexity
O(1)
Merge sort best time complexity
O(n log n)
Merge sort average time complexity
O(n log n)
Merge sort worst time complexity
O(n log n)
Merge sort space complexity
O(n)
Quick sort best time complexity
O(n log n)
Quick sort average time complexity
O(n log n)
Quick sort worst time complexity
O(n2)
Quick sort space complexity
O(log n)