Computer Science Study Materials for Competitive Exams

Sample Questions, Previous Year Solved Papers, Study Materials For Competitive Examinations Like UGC NET, SET And GATE Computer Science.

Thursday, 10 September 2015

CBSE UGC NET Computer Science Paper III Solved June 2015 - Part 4

31.       An all-pairs shortest-paths problem is efficiently solved using:
(A) Dijkstra' algorithm              (B) Bellman-Ford algorithm
(C) Kruskal Algorithm             (D) Floyd-Warshall algorithm
Answer: D
32.       The travelling salesman problem can be solved in:
(A) Polynomial time using dynamic programming algorithm
(B) Polynomial time using branch-and-bound algorithm
(C) Exponential time using dynamic programming algorithm or branch-and-bound algorithm.
(D) Polynomial time using backtracking algorithm.
Answer: C
33.       Which of the following is asymptotically smaller?
(A) lg(lg*n)        (B) lg*(lg n)
(C) lg(n!)            (D) lg*(n!)
Answer: A
34.       Consider a hash table of size m=100 and the hash function h(k) = floor(m(kA mod 1)) for A = (√5 − 1)/2 = 0.618033. Compute the location to which the key k = 123456 is placed in hash table.
(A) 77     (B) 82
(C) 88     (D) 89
Answer: C
35.       Let f(n) and g(n) be asymptotically non-negative functions. Which of the following is correct?
(A) θ(f(n) * g(n)) = min(f(n), g(n))
(B) θ(f(n) * g(n)) = max(f(n), g(n))
(C) θ(f(n) + g(n)) = min(f(n), g(n))
(D) θ(f(n) + g(n)) = max(f(n), g(n))
Answer: D

36.       The number of nodes of height h in any n - element heap is ..............
(A) h                   (B) zh
(C) ceil(n/zh)     (D) ceil(n/zh+1)
Answer: D
37.       In Java, when we implement an interface method, it must be declared as:
(A) Private         (B) Protected
(C) Public          (D) Friend
Answer: C
38.       The Servlet Response interface enables a servlet to formulate a response for a client using the method ...............
(A) void log(Exception e, String s)
(B) void destroy()
(C) int getServerPort()
(D) void setContextType(String Type)
Answer: D
39.       Which one of the following is correct?
(A) Java applets cannot be written in any programming language
(B) An applet is not a small program.
(C) An applet can be run on its own.
(D) Applets are embedded in another applications.
Answer: D
40.    In XML we can specify the frequency of an element by using the symbols:
(A) + * !               (B) # * !
(C) + * ?             (D) - * ?
Answer: C

No comments:

Post a Comment