.... 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

21 minutes ago
Sobia Malik left a comment for + M.TariK MaliC
31 minutes ago
Aman replied to shifa arshad's discussion CS601 GDB 15th Aug 2018 to 17th aug 2018 in the group CS601 Data Communication
38 minutes ago
40 minutes ago
Aman joined + M.TariK MaliC's group

### CS601 Data Communication

40 minutes ago
48 minutes ago
+αиgєℓ єуєѕ posted discussions
1 hour ago
Aman replied to +αиgєℓ єуєѕ's discussion CS610 - Computer Network Graded Discussion Board in the group CS610 Computer Network
2 hours ago

İzmir, Turkey