Miscellaneous On Data Structures - Study Mode

[#486] The pseudocode for the independent set problem is given below. Which of the following gives the time complexity for it? Independent (G = (V, E))
{
temp=true
for every {u, v} in the subset
{
check if they have any edge between them
if edge exists, then set temp as false and break
}
If temp is true
correct result
else
incorrect
}
Correct Answer

(A) O(V + E)

[#487] When is a graph said to be bipartite?
Correct Answer

(A) If it can be divided into two independent sets A and B such that each edge connects a vertex from to A to B

[#488] The resultant vector from the cross product of two vectors is . . . . . . . .
Correct Answer

(B) perpendicular to the plane containing both vectors

[#489] Recursive selection sort is a comparison based sort.
Correct Answer

(A) true

[#490] Space complexity of recursive solution of tower of hanoi puzzle is . . . . . . . .
Correct Answer

(B) O(n)