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

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: 9295

.

+ 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

assignment ka solve dey do koi

es ka tora sa idea solution da do koi 

ksi k pas koi b idea nh ha? big oh of best case ka topic to handouts ma b nh ha

Please listen the videos of lecture # 3 & 4 for first question and videos of lecture # 10 & 11 for second question;
all these concepts have been discussed in detail there.

thanks

es br khair nhiii  subj e bht ajeeb saree 

Yr

Really bad.

plz tell me.. while or if loop  kitne br access hungy ??

Plz listen lec#3 for line by line Analysis and listen lec#7 for Big-oh
Listen Lec#10 for 2nd question

Answer of Question # 2 

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

 

Pivot is 335. K=19

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

RankX =11, Recurse K=(19-11)=8, Partition Pivot = 11

Pivot is 402,

353, 402, 933, 782, 904, 416, 583, 525, 859, 573, 526, 627, 631, 590,  

Rankx =2, Recurse K= (8-2)=6 , Partition Pivot = 13

Pivot is 590

 526,573, 525, 583, 416, 590, 933, 782, 904, 859, 627, 631,

Rankx =6, K=6 , Partition Pivot = 19

So the 19th Smallest from the given array is 590.

Remember in your prayers!

RSS

Latest Activity

+ M.Tariq Malik replied to + M.Tariq Malik's discussion CS405 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019 in the group CS405 Database Programming using Oracle 11i
42 seconds ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion CS405 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019 in the group CS405 Database Programming using Oracle 11i
1 minute ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion CS405 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019 in the group CS405 Database Programming using Oracle 11i
1 minute ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion CS405 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019 in the group CS405 Database Programming using Oracle 11i
2 minutes ago
Ayaat replied to Kashif Nadeem - MSCS's discussion All in one MCQs of Midterm ENG201 in the group ENG201 Business and Technical English Writing
2 minutes ago
Profile IconAyaat and Mati Ullah joined + M.Tariq Malik's group
2 minutes ago
+ M.Tariq Malik liked + M.Tariq Malik's discussion CS405 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019
3 minutes ago
+ M.Tariq Malik added a discussion to the group CS405 Database Programming using Oracle 11i
3 minutes ago
Ayaat replied to + ℱȺℋ££M ᏕȺQǐβ's discussion 16 Eng 301 MiD Term Solved Papers with Reference + Solved Short Questions in the group ENG301 Business Communication
4 minutes ago
Ayaat replied to + ℱȺℋ££M ᏕȺQǐβ's discussion 16 Eng 301 MiD Term Solved Papers with Reference + Solved Short Questions in the group ENG301 Business Communication
5 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion MCM304 Mass Media in Pakistan Assignment No 01 Fall 2019 Solution & Discussion in the group MCM304 Mass Media in Pakistan
6 minutes ago
Ayaat replied to + ℱȺℋ££M ᏕȺQǐβ's discussion 16 Eng 301 MiD Term Solved Papers with Reference + Solved Short Questions in the group ENG301 Business Communication
6 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion MGT611 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019 in the group MGT611 Business & Labor Law
7 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion PHY301 Circuit Theory Assignment No 01 Fall 2019 Solution & Discussion in the group PHY301 Circuit Theory
9 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion PHY301 Circuit Theory Assignment No 01 Fall 2019 Solution & Discussion in the group PHY301 Circuit Theory
13 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion PHY301 Circuit Theory Assignment No 01 Fall 2019 Solution & Discussion in the group PHY301 Circuit Theory
14 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion STA631 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019 in the group STA631 Inferential Statistics
16 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion STA631 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019 in the group STA631 Inferential Statistics
16 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion STA631 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019 in the group STA631 Inferential Statistics
17 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion STA631 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019 in the group STA631 Inferential Statistics
18 minutes ago

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

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