Jobs in Pakistan

CS502 Assignment 2 Solution Spring 2021 - Virtual University

CS502 Assignment 2 Solution Spring 2021 - Virtual University


CS502 Assignment 2 Solution Spring 2021 - Virtual University


Solution: 


Assignment No. 02
Spring 2021
CS502-
Design and Analysis of Algorithms

 

Total Marks: 20

 

Due Date: 02-06-2021

Instructions

Please read the following instructions carefully before solving & submitting assignment:

It should be clear that your assignment will not get any credit (zero marks) if:

Ø    The assignment is submitted after due date.

Ø    The submitted assignment is other than MS Word file.

Ø    The submitted assignment does NOT open or file is corrupted.

Ø    The assignment is copied (from other student or ditto copy from handouts or internet).

 

Uploading instructions

For clarity and simplicity, you are required to upload/submit only one .doc/docx file.

 

Objectives

The objectives of this assignment are;

 

ü  To make you familiar with Merge Sort.

ü  To make you familiar with Heap Sort.

 

 

For any query about the assignment, contact at CS502@vu.edu.pk

 

 

Good Luck! 

 

 

 

 

 

 

 

 

 

 

Total Marks: 20

 

Question 1  (5+5 marks)

Sort the following list using Merge Sort in ascending order.

"K, N, L, D, S, D, Q, R"

It is required to draw tree structure of the merge sort procedure for both divide and combine phase separately.

Note: Finally, you will have two tree structure one for divide phase and other is for combine phase and it is also required to performed all the steps to get full marks.


Merge Sort:

 

CS502 Assignment 2 Solution Spring 2021 - Virtual University

    Heap Sort:

 

CS502 Assignment 2 Solution Spring 2021 - Virtual University

Question 2 (10 marks)

For the given array, draw the final Max-Heap structure. Show a final single tree only. Steps are not required.      

43

12

23

2

55

11

7

33

60

32



CS502 Assignment 2 Solution Spring 2021 - Virtual University


 

 

Lectures Covered: Lecture No. 07 to 16.

Deadline: Your assignment must be uploaded / submitted on or before 02-06-2021.




 

Download File:

Click Here

4 comments:

  1. I discovered your blog web site on google and test a few of your early posts. Continue to keep up the superb operate. I simply extra up your RSS feed to my MSN News Reader. In search of forward to studying extra from you afterward!… Best university assignment wirter

    ReplyDelete
  2. I should assert barely that its astounding! The blog is informational also always fabricate amazing entitys. STATA expert help

    ReplyDelete
  3. The Need Assignment composing help is fundamental for understudies who are moving to another area to look for a vocation and carry on with a superior life. Assignment Writing Service UK

    ReplyDelete
  4. The corporate world of today is demanding great knowledge and skills from its participants. At the lowest level of any organization, an employee is expected to have through knowledge of internal and external environment surrounding his or her work. Assignment Help London

    ReplyDelete

Verification: 5454749714e96868