# CS502 VU Midterm Papers Spring May 2012

Given an unorder list of n numbers x1,x2,x3,……..xn and all elemnts are common if there
are at least n/5 copies.give a o(nlogn) algorithm
: 5 marks ka qstn tha
: 2. Draw max heap 50,31,45,30,2,7,40,12,28,1 ..marks(5)
3.construct an optimal solution for 0/1 knapsack
4. define with algorithm bubble sort,insertion sort and selection sort
5.how can we make it possible for an array of n elements that every elemnt has equalÂ probability of 1/n to select uing pivot elemnets
6.Plagrism detection with algorithm
mcqs buht mushkil that theory based nhi thay best n worst case algorithm ki timing ko
Prove krnay walay mcqs thay.koi b past papers mein say nhi tha

1)heap or heap order 2 marks

2) selection me sy tha k an arry n element so the probability 1/n ? 2 marks

3) how correct the speeling in edit distance 3 marks
4) MATHS and ART ko edit distance karna tha 3 marks
5) matrix chain ki jo example hai wo i thi 5 markks
6) min or max heap of height h 5 marks