We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Looking For Something at Site? Search Below

Question # 1: 10 Marks

For the following code snippet, provide line-by-line analysis and construct function T(n) that give the runtime of this code snippet as a function of "n". Also determine the big-Oh of Best-case, Worst-case and Average case for this code snippet. [Marks: 4+2+2+2]

Search(A, Key)
i←1
while (A[i] ≠ key) and (i ≤ length[A])
i←i+1
if ( i≤ length[A])
return true
else
return false

Question # 2: 10 Marks

Find the 19thsmallest element from the array given below using Selection Algorithm (Sieve Technique);you are required to provide complete procedure along with array indexing and their values at each step.

933, 782, 116, 276, 904, 353, 416, 157, 277, 583, 525, 208, 269, 98, 181, 859, 573, 225, 526, 627, 631, 590, 257, 402, 335

Note: pivot must be the last element of the array in each iteration (i.e. q = r)


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Views: 9400

Attachments:

Replies to This Discussion

Thanks

Thanks

CS502 Helping Video Complete

good effort kindly es ko word formate ma b share kar do kal sy phly

Solution file

Attachments:

ya sara solutions mian worst good ya bad case ko kasa calculate karna hia ya to batao pahla question main ###########################ßßßß

RSS

Latest Activity

Miss. Churhail replied to +M.Tariq Malik's discussion Grand Quiz Or Mid Term? Must Watch
20 minutes ago
jawad posted a video
1 hour ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion ENG301 Online Quiz No 01 Fall 2020 Solution Discussion in the group ENG301 Business Communication
1 hour ago
KASHIF MAHMOOD liked +M.Tariq Malik's discussion Grand Quiz Or Mid Term? Must Watch
1 hour ago
Adeel Sheraz joined +M.Tariq Malik's group
1 hour ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS602 Computer Graphics Assignment 01 Fall 2020 Solution / Discussion Due Date: 04-12-2020 in the group CS602 Computer Graphics
1 hour ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS602 Computer Graphics Assignment 01 Fall 2020 Solution / Discussion Due Date: 04-12-2020 in the group CS602 Computer Graphics
1 hour ago
+M.Tariq Malik liked +M.Tariq Malik's discussion CS602 Computer Graphics Assignment 01 Fall 2020 Solution / Discussion Due Date: 04-12-2020
1 hour ago
+M.Tariq Malik added a discussion to the group CS602 Computer Graphics
1 hour ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion MGT601 GDB No 01 Fall 2020 Solution / Discussion Last Date: 27-11-2020 in the group MGT601 SME Management
1 hour ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS201 Assignment 01 Fall 2020 Solution / Discussion in the group CS201 Introduction to Programming
1 hour ago
Profile IconAbdul hannan, kiran shahzadi, ahim and 13 more joined Virtual University of Pakistan
1 hour ago

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.