Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Floyd Warshall (all pair shortest path )

Source Code:   


#include<iostream.h>
#include<conio.h>


void main()
{clrscr();
int g[10][10],n,i,j,k;
cout<<"program for Floyd warshall (all pair shortest path)by: Tarun rawat\n\n";


Quick Sort

Source Code:

#include<iostream.h>
#include<conio.h>

void quicksort(int*,int,int);
int partion(int*,int,int);
void main()
{clrscr();
 cout<<"Enter ten number for quick sort by-Tarun rawat:\n\n";

Heap Sort (using random input)

Source Code:

#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#include<math.h>
#define MAXSIZE RAND_MAX

0/1 Knapsack Problem


Given weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. In other words, given two integer arrays val[0..n-1] and wt[0..n-1] which represent values and weights associated with n items respectively. Also given an integer W which represents knapsack capacity, find out the maximum value subset of val[]

Job Scheduling

Source Code:

#include<iostream.h>
#include<conio.h>

void job(int*,int*,int,int);
void main()
{clrscr();
 cout<<"Program created by Tarun Rawat Job Scheduling\n\n";

Fractional Knapsack

There are n items in a store. For i =1,2, . . . , n, item i has weight wi > 0 and worth vi > 0. Thief can carry a maximum weight of W pounds in a knapsack. In this version of a problem the items can be broken into smaller piece, so the thief may decide to carry only a fraction xi of object i, where 0 ≤ xi ≤ 1. Item i contributes xiwi to the total weight in the knapsack, and xivi to the value of the load.here are n items in a store.

Blogger Widgets

Find Us On Google, Just type - way2cplusplus -

If you have any questions on implementing or understanding this C++ Program , shoot me a comment and I'll be glad to help! :) :)