ASSIGNMENT 2
Deadline
Your assignment must be uploaded/submitted at or before 4th June 2015.
Uploading instructions
Please view the assignment submission process document provided to you by the Virtual University to upload the assignment. And submit your solution as Microsoft word file.
Rules for Marking
It should be clear that your assignment will not get any credit if:
oThe assignment is submitted after due date.
oThe submitted assignment does not open or run.
oThe assignment is copied
Problem #1: 10 marks
Recall BuildHeap (1,n) that builds a heap of n-elements from an array:
for i = n/2 downto 1 do
bubble_down(i);
For the array drawn below, fill the boxes for each iteration of BuildHeap(1,10).
Assume that the root of the heap holds the maximum element.
15
20
8
56
2
38
36
26
28
7
Problem #2: 5 marks
Arrange the following in the Most to Least complexity order.
210000023232log1000000000000000100000000000000log*log1000000000000log*!log**1000000000000000
Tags:
Dear Students Don’t wait for solution post your problems here and discuss ... after discussion a perfect solution will come in a result. So, Start it now, replies here give your comments according to your knowledge and understandings....
Tariq bhai ap jub b hamesha yeh kehtay hu tu dill ku tasali hu jati ha EXTEND DATE waley din b " a perfect solution will come "
Finally Question 1 Done!. Friends This is my first post. I share the way of solution's. How to solve the question no 1. Same question 2006 main bhi aya howa hain just values change hain. main 2006 wala question upload kar raha hoon. es ko samaj kar aap apni assignment complete kar saktay hain.
n/2 will be at value 2 (5th value) e.g 2.
but why max value e.g 50 is not placed at 5th value e,g 2.
50 will be placed at 2, is it not ?
15 20 8 28 2 38 36 26 56 7
15 20 38 28 2 8 36 26 56 7
15 20 8 56 2 38 36 26 28 7
15 28 38 56 2 8 36 26 20 7
28 56 38 26 2 8 36 15 20 7
check the my answer
after 5th iteration the answer is: 56,28,38,26,7,8,36,15,20,2
Sheraz Akram .. mera bhi final answer yehi hai.
Rosey kya aap ne 2nd question b complete ker liya?
bit i think 36 r 8 and 20 r 15 b change hon gy
© 2021 Created by + M.Tariq Malik.
Powered by
Promote Us | Report an Issue | Privacy Policy | Terms of Service
We are user-generated contents site. All product, videos, pictures & others contents on site don't seem to be beneath our Copyrights & belong to their respected owners & freely available on public domains. We believe in Our Policy & do according to them. If Any content is offensive in your Copyrights then please email at m.tariqmalik@gmail.com with copyright detail & We will happy to remove it immediately.
Management: Admins ::: Moderators
Awards Badges List | Moderators Group
All Members | Featured Members | Top Reputation Members | Angels Members | Intellectual Members | Criteria for Selection
Become a Team Member | Safety Guidelines for New | Site FAQ & Rules | Safety Matters | Online Safety | Rules For Blog Post