Capgemini Previous Year Question


1.What is the time complexity of searching for an element in circular linkedlist?

a)O(n)
b)O(n*log n)
c)O(n)
d)None of these


(a) is the correct option.




2.What it state of array after 3rd pass of bubble sort?

arr[]=3,4,9,2,1,5,6,0

a)O(n)
b)O(n*log n)
c)O(n)
d)None of these


(a) is the correct option.

loading..




3.In the worst case,the number of comparisions needed to search a singly linked list of length 'n' for a given element is?

a)O(log2n)
b)O(n/2)
c)O(log2n+1)
d)n


(d) is the correct option.