We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

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


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

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)

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 9322

.

+ 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)

Attachments:

Replies to This Discussion

thanks bro or han yi array ki form main likhna hay

you can write it vertically or in horizontally. in array form or in boxes whatever what you feel easy you can do.

tou q.1?

uski abi smj ni a rhi ma try kr rha solve krne ki.
i'll share if done.

thanks _dastgeer

correct solution of cs502

Attachments:

itni mushkil hai kch pta nai chal raha question 1 k bary mein

Search(A, Key)

i←1

1 access

while (A[i] ≠ key) and (i ≤ length[A])

n times

i←i+1

 1 access

if ( i ≤ length[A])

n times

return true

1 access

else

return false

1 access

T(search) = 1+ 2(n+1)+1+1

             =5+2n

so Big O notation will be O(n)

bhai ye solution hai kiya????

check it...

Attachments:

thanks Naveed Qureshi

Naveed bhai es mai se kon sa solutoin thk ha? apka ya aysha ka?

RSS

Latest Activity

+ M.Tariq Malik replied to MUHAMMAD USMAN's discussion CS407 Assignmen 3 solution Fall 2020 in the group CS407 Routing and Switching
53 seconds ago
+ ! ! ༄PʂყCԋO༄ ! ! + liked + ! ! ༄PʂყCԋO༄ ! ! +'s blog post !!!!Doob k Mar jao!!!!
1 minute ago
+ ! ! ༄PʂყCԋO༄ ! ! + liked + ! ! ༄PʂყCԋO༄ ! ! +'s blog post !!!!!!!Fvrt Lines!!!!!!!!
1 minute ago
+ M.Tariq Malik liked MUHAMMAD USMAN's discussion CS407 Assignmen 3 solution Fall 2020
1 minute ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion ENG001 Assignment No 02 Fall 2019 Solution & Discussion in the group ENG001 Elementary English
2 minutes ago
+ M.Tariq Malik liked + M.Tariq Malik's discussion ENG001 Assignment No 02 Fall 2019 Solution & Discussion
2 minutes ago
+ M.Tariq Malik liked ہاشم's discussion ENG001 Assignment Solution 2 Fall 2019 & 2020
2 minutes ago
Profile Iconmunazza anees, zani, Zoya and 13 more joined Virtual University of Pakistan
3 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion CS301 Data Structures GDB Fall 2019 Solution & Discussion in the group CS301 Data Structures
3 minutes ago
+ M.Tariq Malik liked + M.Tariq Malik's discussion CS301 Data Structures GDB Fall 2019 Solution & Discussion
3 minutes ago
+ M.Tariq Malik added a discussion to the group CS301 Data Structures
4 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion CS302 Assignment No 03 Fall 2019 Solution & Discussion Due Date: 27-01-2020 in the group CS302 Digital Logic Design
8 minutes ago

Today Top Members 

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

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

.