Category: Data Structure

C Program for Sorting an Array using Shell Sort using Knuth increments

Shell Sort using Knuth increments Write a C Program for Sorting an Array using Shell Sort using Knuth increments.  Here’s simple C Program for Sorting an Array using Shell Sort using Knuth increments in C Programming Language. Shell Sort Shell Sort is mainly a variation of Insertion Sort. In insertion sort, we move elements only one position ahead.

Demo Example to find Shortest Paths using Bellman-Ford algorithm

Shortest Paths using Bellman-Ford Algorithm Write a C  Demo Program to find Shortest Paths using Bellman-Ford Algorithm Example. Here’s a simple C Program to find Shortest Distances or Paths using Bellman-Ford Algorithm with output in C Programming Language. Bellman-Ford Algorithm The Bellman-Ford algorithm is a graph search algorithm that finds the shortest path between a given source vertex and all other

C Program to implement Topological Sorting Algorithm Example

Topological Sorting Algorithm Write a C Program to implement Topological Sorting Algorithm Example. Here’s simple Program to implement Topological Sort Algorithm Example in C Programming Language. Topological Sorting Topological sorting or Topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge (u v) from vertex u to vertex v, u comes before v in the ordering. For instance, the vertices of the graph may

C Program for Minimum Spanning Tree using Kruskal’s Algorithm Example

Minimum Spanning Tree using Kruskal’s Algorithm Write a C Program for Creating Minimum Spanning Tree using Kruskal’s Algorithm Example. Here’s simple Program for creating minimum cost spanning tree using kruskal’s algorithm example in C Programming Language. Kruskal’s Algorithm Kruskal’s algorithm is a minimum-spanning-tree algorithm which finds an edge of the least possible weight that connects any two trees in the

C Program for Creating Minimum Spanning Tree using Prim’s Algorithm

Minimum Spanning Tree using Prim’s Algorithm Write a C Program for Creating Minimum Spanning Tree using Prim’s Algorithm. Here’s simple Program for minimum cost spanning tree using prim’s algorithm example in C Programming Language. Prim’s Algorithm   Prim’s algorithm is a greedy algorithm that finds a minimum spanning tree for a connected weighted undirected graph. It finds

C Program to find Shortest Path Matrix by Modified Warshall’s Algorithm

Shortest Path Matrix by Modified Warshall’s Algorithm Write a C Program to find Shortest Path Matrix by Modified Warshall’s Algorithm. Here’s simple Program to find Shortest Path Matrix by Modified Warshall’s Algorithm in C Programming Language. Modified Warshall’s Algorithm The Floyd Warshall Algorithm is for solving the All Pairs Shortest Path problem. The problem is to find