Skip to content

prathwik0/design-and-analysis-algorithms-in-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6e49c53 · Jul 23, 2023

History

92 Commits
Jun 1, 2023
Jun 1, 2023
Jun 10, 2023
Jul 13, 2023
Jun 11, 2023
May 15, 2023
Jun 11, 2023
Jul 3, 2023
Jul 16, 2023
Jun 1, 2023
Jun 12, 2023
Jun 6, 2023
Jun 11, 2023
Jun 11, 2023
Jun 11, 2023
Jul 23, 2023

Repository files navigation

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