An open API service indexing awesome lists of open source software.

https://github.com/dpetrosy/saed_algorithms

In this repository, I store implementations of algorithms learned at the university.
https://github.com/dpetrosy/saed_algorithms

algorithms cpp cpp11 heap modern-cpp problem-solving sorting-algorithms university-course

Last synced: 10 months ago
JSON representation

In this repository, I store implementations of algorithms learned at the university.

Awesome Lists containing this project

README

          

## 📜 About Repository
**SAED** stands for Synopsys Armenia Educational Department, the university where I received my bachelor's degree. \
In this repository, I store my implemented algorithms, which I learned during SAED's algorithms course.

## 📑 Subjects

1. Write a program that calculates the square root of a number using the Babylon method.
2. Write a program to check if an integer is prime.
3. Write a program to find the greatest common divisor (GCD) of two integers by prime factorization.
4. Write a program to find the greatest common divisor (GCD) of two integers using the Euclidean algorithm.
5. Write a program that will calculate the lowest common multiple (LCM) of two integers by factorization.
6. Implement the "Insertion Sort" algorithm, which will sort n integers in increasing order.
7. Write a program that adds two n-bit binary numbers, stored in two arrays of size n.
8. Write a program that finds the maximum element in an array of size n. Analyze the running time.
9. Implement the "Selection Sort" algorithm, which will sort n integers in increasing order.
10. Implement the "Merge Sort" algorithm, which will sort n integers in increasing order.
11. Implement a recursive version of "Insertion Sort".
12. Implement a recursive version of "Binary Search".
13. Implement a loop version of "Binary Search".
14. Implement a hybrid sorting algorithm of Merge and Insertion sort so that in cases where the array size gets smaller than the given k positive number, it directly sorts with Insertion.
15. Implement the "Bubble Sort" algorithm, which will sort n integers in increasing order.
16. Swap two integers without a temporary.
17. Given an array of integers, write a program to output its maximum subarray indices. Implement the brute-force version with O(n^2) complexity.
18. Solve problem 17 with the O(n) complexity algorithm.
19. Implement the "Min Heapify" algorithm.
20. Implement an iterative version of the "Max Heapify" algorithm.
21. Implement a bogomax() function that takes an array and returns the first element if it's the maximum; otherwise, it finds the maximum by repeatedly swapping the first element with a randomly selected one and re-checking.
22. Write a function that will find the middle node value in a singly linked list.