rajivnayanc / Algorithms

This repository contains many basic algorithms coded in C/C++.

Repository from Github https://github.comrajivnayanc/AlgorithmsRepository from Github https://github.comrajivnayanc/Algorithms

Algorithms

This repository contains many basic algorithms coded in C/C++.

Many more algorithms will be updated here.

Note

1. In some IDE of C/C++, it will not detect few libraries like "algorithm.h" and "bits/stdc++.h". In that case, 
   change the extension of the files from .c to .cpp

2. Also, in linux, to run C/C++ files with "math.h", add -lm while executing. Eg. g++/gcc <filename>.c -lm

3. In Graph problems, in weight adjacency matrices, 0 in input represents 0 distance from i->i (from same vertex to same vertex)  and 0          represents INF when is not equal to j , i.e, from one vertex to different vertex if there is no path between them.

Binary Search

- Binary_Search.c
- Application.c    (Application of Binary Search)

Sorting Algorthms

- Merge_Sort.c
- Quick_Sort.c
- heapsort.c
- Shell_Sort.c
- Insertion_Sort.c
- Selection_Sort.c

Divide and Conquer Applications

- Problems statements are specified in the C file as comments.

Strassen's Matrix Multiplication

- Strassen_multiplication.c

Greedy Method

- Dijkstra_algo.c
- Job_sequencing.c  (Job sequencing with deadline)
- Knapsack_Problem.c
- Krushkal_algo.c
- Prims_algorithms.c

Dynamic Programming Problem

- matrix_chain_multiplication.c (Optimal Order for multiplying n matrices)
- OBST.c   (Optimal Binary Search Tree with Dummy Keys)
- 01_KnapSack_Problem.c (Using Set Method)
- All_Pair_shortest_Path.c (Floyd Warshall Algorithm) 

About

This repository contains many basic algorithms coded in C/C++.


Languages

Language:C 90.3%Language:C++ 9.7%