www.vustudents.ning.com

# CS401 Assignment No 02 Spring 2019 Solution & Discussion Due Date: 30-05-2019

CS401 Assignment No 02 Spring 2019 Solution & Discussion Due Date: 30-05-2019

Views: 4624

### Replies to This Discussion

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>

Discussed & be touched with this discussion. After discussion a perfect solution will come in a result at the end.

“How to Join Subject Study Groups & Get Helping Material”

P.S:    Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”

Share below link with friends for solution & Discussion. A Single link for help in your education.

http://bit.ly/vucodes

solution ???

Q1. Write a subroutine to sort an array in ascending order by Selection Sort.                       (20 Marks)

You can understand the working of selection sort by this example:

array[] = 64 25 12 22 11

// Find the minimum element in array[0...4]

// and place it at the beginning i.e. index 0 of the array

11 25 12 22 64

// Find the minimum element in array[1...4]

// and place it at index 1

11 12 25 22 64

// Find the minimum element in array[2...4]

// and place it at index 2

11 12 22 25 64

// Find the minimum element in array[3...4]

// and place it at index 3

11 12 22 25 64

Array should contain your VU ID as signed integers e.g.

VU ID: BC190206435

Array: -1,-9, 0,-2, 0,-6,-4,-3,-5

After Sorting:-9,-6,-5,-4,-3,-2,-1,0, 0

Attachments:

brother in this is program one must show his student it and ,, the solution you provided .. how to insert ours in it .. can you help with it ..

Q1. Write a subroutine to sort an array in ascending order by Selection Sort.                       (20 Marks)

You can understand the working of selection sort by this example:

array[] = 64 25 12 22 11

// Find the minimum element in array[0...4]

// and place it at the beginning i.e. index 0 of the array

11 25 12 22 64

// Find the minimum element in array[1...4]

// and place it at index 1

11 12 25 22 64

// Find the minimum element in array[2...4]

// and place it at index 2

11 12 22 25 64

// Find the minimum element in array[3...4]

// and place it at index 3

11 12 22 25 64

Array should contain your VU ID as signed integers e.g.

VU ID: BC190206435

Array: -1,-9, 0,-2, 0,-6,-4,-3,-5

After Sorting:-9,-6,-5,-4,-3,-2,-1,0, 0

Tariq bhai please discuss the solution

Idea Solution CS401 Assignment No-2

Attachments:

output nae araha.

well this is Bubble sort on handout pg 39

1

2

3

4

5

## Latest Activity

++❤MQ++A❤❤❤ updated their profile
3 hours ago
++❤MQ++A❤❤❤ liked ++❤MQ++A❤❤❤'s discussion Yei woh Piyar nhi
3 hours ago
++❤MQ++A❤❤❤ liked ++❤MQ++A❤❤❤'s discussion Zindigi sei Aishq Hojaye
3 hours ago
++❤MQ++A❤❤❤ posted discussions
4 hours ago
++❤MQ++A❤❤❤ liked Zohaib Hassan's discussion ***اب دل بجھا بجھا ہے***
4 hours ago
SAIM updated their profile
4 hours ago
+ !! Ήලᵯᵯℹ Ⲥⱨ !! +!! liked ++❤MQ++A❤❤❤'s discussion Mohabbat ke Bazaar
6 hours ago
6 hours ago