In in-place sorting algorithm is one that uses arrays for storage : An additional array No additional array (Right Answer) Both of above may be true according to algorithm More than 3 arrays of one dimension. The running time of quick sort depends heavily on the selection of No of inputs Arrangement of elements in array Size o elements Pivot element …
Read More »CS502
CS502 Latest solved MCQs by M. Zeeshan and Arslan Ali
1. In which order we can sort? • increasing order only • decreasing order only • increasing order or decreasing order • both at the same time 2. heap is a left-complete binary tree that conforms to the ___________ • increasing order only • decreasing order only • heap order • (log n) order 3. In the analysis of Selection …
Read More »CS502 Solved Quizs and MCQS for final By Arslan Ali
What is the time complexity to extract a vertex from the priority queue in Prim’s algorithm? Select correct option: O (log E) ? (V) ? (V+E) O (log V) Which is true statement in the following. Kruskal algorithm is multiple source technique for finding MST. Kruskal’s algorithm is used to find minimum spanning tree of a graph, time complexity …
Read More »CS501 today solved Quizs for Final Term
Question # 1 of 10 Type A of SRC has which of the following instructions? a) andi, instruction b) No operation or nop instruction c) lar instruction d) ldr instruction e) Stop operation or stop instruction Select correct option: (a)& (b) (b)&(c) (a)&(e) (b)&(e) Question # 2 of 10 What functionality is performed by the instruction ―lar R3, 36‖ of …
Read More »CS502 Solved Mid Term Paper by Arslan Ali
Question No: 1 ( Marks: 1 ) – Please choose one Random access machine or RAM is a/an ► Machine build by Al-Khwarizmi ► Mechanical machine ► Electronics machine ► Mathematical model Question No: 2 ( Marks: 1 ) – Please choose one _______________ is a graphical representation of an algorithm ► notation ► notation ► Flowchart ► …
Read More »CS502 Solved Subjective for Mid Term Papers
How we build heap We build a max heap out of the given array of numbers A[1..n]. We repeatedly extract the maximum item from the heap. Once the max item is removed, we are left with a hole at the root. Write Pseudo code for KNAPSACK algorithm? Solution: KNAPSACK (n, W) 1 for w=0,W 2 do V[0,w]ß0 3 for i=0,n …
Read More »CS502 latest Solved MCQs Mega Collection for mid term papers
How much time merge sort takes for an array of numbers? Select correct option: T(n^2) T(n) T( log n) T(n log n) For the heap sort we store the tree nodes in Select correct option: level-order traversal in-order traversal pre-order traversal post-order traversal Sorting is one of the few problems where provable ________ bonds exits on how fast …
Read More »CS502 Solved MCQs Mega Collection for Mid term Papers
25. Sieve Technique applies to problems where we are interested in finding a single item from a larger set of _____________ n items phases pointers constant 26. A (an) _________ is a left-complete binary tree that conforms to the heap order heap binary …
Read More »