An algorithm is a specific procedure for solving a well-defined computational problem. The development and analysis of algorithms is fundamental to all aspects of computer science: artificial intelligence, databases, graphics, networking, operating systems, security, and so on. Algorithm development is more than just programming.
This repository contains all the code for the course "Algorithms and Data Structures" in the fall semester 2020 year in KBTU. This repository includes both the code from the lectures and the codes of labs and contests.
Week 07 - QuickSort, MergeSort
Week 15 - Bellman Ford, Dijkstra algorithm
Laboratory work 1 - Stack, Deque, Queue
Laboratory work 2 - Linear Search, Binary Search
Laboratory work 3 - Binary Tree. Binary Search Tree (BST).
Laboratory work 4 - Heap, HeapSort
Laboratory work 5 - Hashes, Rabin-Karp algo and KMP
Laboratory work 6 - Trie
Laboratory work 7 - Graphs. DFS, BFS, Topological Sort
Contest 01 - STL, Binary Search Algorithm
Contest 02 - Sorting Algorthms
Contest 03 - String Algorithms
Contest 04 - Graphs Algrorithms
Big O notation is used to classify algorithms according to how their running time or space requirements grow as the input size grows. On the chart below you may find most common orders of growth of algorithms specified in Big O notation.
| Big O Notation | Computations for 10 elements | Computations for 100 elements | Computations for 1000 elements |
|---|---|---|---|
| O(1) | 1 | 1 | 1 |
| O(log N) | 3 | 6 | 9 |
| O(N) | 10 | 100 | 1000 |
| O(N log N) | 30 | 600 | 9000 |
| O(N^2) | 100 | 10000 | 1000000 |
| O(2^N) | 1024 | 1.26e+29 | 1.07e+301 |
| O(N!) | 3628800 | 9.3e+157 | 4.02e+2567 |
This repository is released under the MIT license. In short, this means you are free to use this software in any personal, open-source or commercial projects. Attribution is optional but appreciated.