Skip to content

Files

Latest commit

6e49c53 · Jul 23, 2023

History

History
46 lines (37 loc) · 5.42 KB

File metadata and controls

46 lines (37 loc) · 5.42 KB

Design and Analysis of Algorithms (DAA) in C

No. Title Algorithms Time Complexity Space Complexity
Euclid's algorithm Euclid's algorithm adf a s d f asdf asdf a s d f asdf Euclid's algorithm
Consecutive Integer Euclid's algorithm

List of programs

No. Title Algorithms Time Complexity Space Complexity
1 GCD Euclid's algorithm $ O(log(\min(a,b))) $ O(1)
No. Title Algorithms Time Complexity Space Complexity
Consecutive Integer O ( min ( a , b ) ) O ( 1 )
Middle School Method O ( n ) O ( m a x F a c t o r s )
2 Prime Numbers Sieve of Eratosthenes O ( n log log n ) O ( n )
3 Factorial Iterative Version
No. Title Algorithms Time Complexity Space Complexity
Recursive Version O ( n ! )
4 Fibonacci Iterative Version
Recursive Version O ( 2 n )
5 Tower of Hanoi Tower of Hanoi O ( 2 n ) O ( n )
6 Matrices Matrix Multiplication O ( n 3 ) O ( n 2 )
No. Title Algorithms Time Complexity Space Complexity
7 Searching Algorithms Linear Search Ω ( 1 )   Θ ( n )   O ( n ) O ( 1 )
Binary Search Ω ( 1 )   Θ ( log n )   O ( log n ) O ( 1 )
8 Sorting Algorithms Bubble Sort Ω ( n )   Θ ( n 2 )   O ( n 2 ) O ( 1 )
Selection Sort Ω ( n 2 )   Θ ( n 2 )   O ( n 2 ) O ( 1 )
Insertion Sort Ω ( n )   Θ ( n 2 )   O ( n 2 ) O ( 1 )
No. Title Algorithms Time Complexity Space Complexity
Merge Sort Ω ( n log n )   Θ ( n log n )   O ( n log n ) O ( n )
Quick Sort Ω ( n log n )   Θ ( n log n )   O ( n 2 ) O ( 1 )
9 Graph Algorithms Depth First Search
Breadth First Search
10 String Matching Brute Force
Horspool Algorithm