.... How to Find Your Subject Study Group & Join ....   .... Find Your Subject Study Group & Join ....

We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

www.vustudents.ning.com

Study Groups By Subject code Wise (Click Below on your university link & Join Your Subject Group)

[ + VU Study Groups Subject Code Wise ]  [ + COMSATS Virtual Campus Study Groups Subject Code Wise ]

Looking For Something at vustudents.ning.com?Search Here

# CS301 assignment no 3 spring 2018

solution need

last date 26 july 2018

Views: 5534

Attachments:

### Replies to This Discussion

Mojjj kro sary

#include <iostream>
#include <conio.h>
using namespace std;
void min_heapify(int *a,int i,int n)
{
int j, temp;
temp = a[i];
j = 2 * i;
while (j <= n)
{
if (j < n && a[j+1] < a[j])
j = j + 1;
if (temp < a[j])
break;
else if (temp >= a[j])
{
a[j/2] = a[j];
j = 2 * j;
}
}
a[j/2] = temp;
return;
}
void build_minheap(int *a, int n)
{
int i;
for(i = n/2; i >= 1; i--)
{
min_heapify(a,i,n);
}
}
int main()
{
int n, i, x;
cout"enter no of elements of array\n";
cin>>n;
int a[20];
for (i = 1; i <= n; i++)
{
cout"enter element"(i)endl;
cin>>a[i];
}
build_minheap(a, n);
cout"Min Heap\n";
for (i = 1; i <= n; i++)
{
couta[i]endl;
}
getch();
}

A.o.a bhii ya error da raha ha solution??????

Can u help??????

error hai code mein

Ye kia h???

Check it

min heap of all nodes

execute he ni hoti

hoti ha na

ye just example ha.

Ye complete solution h?

ni

sis bas cout py miss hy phr run ho

ri

## Forum Categorizes

Job's & Careers (Latest Jobs)

Scholarship (Latest Scholarships)

Internship (Latest Internships)

::::::::::: More Categorizes :::::::::::

## Latest Activity

shan posted a status
"mjy q nikala???????/"
43 minutes ago
shan joined + M.TariK MaliC's group

### CS401 Computer Architecture and Assembly Language Programming

57 minutes ago
58 minutes ago
shan joined + M.TariK MaliC's group

### CS304 Object Oriented Programming

59 minutes ago
59 minutes ago
^ ÃßÐuL updated their profile
1 hour ago
вαкнтαωαя replied to +Hassan+'s discussion Cheel uri
2 hours ago

İzmir, Turkey