Difference between Dynamic programming and Greedy approach

    In Greedy approach consider greedy choice property, we can make whatever choice seems best at the moment and then solve the sub-problems that arise later. The choice made by a greedy algorithm may depend on choices made so far but not on future choices or all the solutions to the sub-problem. It iteratively […]

C program for finding Optimal Binary Search Tree

 Output:

Calculating running program time – C Programming Tutorial

In this c programming tutorial we are going to see how we can calculate actual running time for any c program or algorithm implementation. Below is the code calculates running time for sorting 9999 elements using bubble sort. Note that on every machine you may get different timings.

 Output:

Least Common Sequence program in C

 Output:

C program for Matrix chain multiplication

 Output :

Matrix chain multiplication dynamic programming (C++ code)