Question
Which of the following is true about the time complexity
of Merge Sort?Solution
Correct Option: Merge Sort (C) has a time complexity of O(n log n) in both the best and worst cases due to its divide-and-conquer approach, where the list is recursively split and merged. Why Other Options Are Wrong: A) O(n), O(n^2): Merge Sort does not have a quadratic time complexity in the worst case, nor does it achieve linear time in the best case. B) O(log n), O(log n): This is incorrect as merge sort deals with linear elements and requires O(n log n) time due to both sorting and merging. D) O(n), O(n log n): While some algorithms achieve linear time in the best case, Merge Sort consistently performs at O(n log n). E) O(n^2), O(n^2): This complexity is associated with algorithms like bubble sort in the worst case, not Merge Sort.
If Y * W % U * V % T & R @ S is true then how is W related to T?
Read the given information carefully and answer the question that follows.
‘B $ C’ means ‘B is the father of C’.
‘B & C’ means...
If U&V$Y@W%Z is true then how is U related to Z?
. ‘L&M’ means ‘L is husband of M’.
‘L%M’ means ‘L is wife of M’.
‘L@M’ means ‘L is father of M’.
‘L#M’ ...
If R ÷ S + T + U, which of the following is true?
If 'A % B' means 'A is wife of B', 'A # B' means 'A is brother of B', 'A @ B' means 'B is son of A', 'A & B' means 'A is daughter of B', 'A $ B' means '...
Answer the questions based on the information given below.
L + M means L is the wife of M.
L ? M means L is the son of M.
L > M m...
If (A @ B) means A is father of B, (A # B) means A is mother of B, (A & B) means A is brother of B, (A % B) means A is sister of B. In expression, ‘L ...
‘A × B’ means ‘A is the brother of B’.
‘A − B’ means ‘A is the mother of B’.
‘A ÷ B’ means ‘A is the father of B...
In a certain code language,
X + Y means 'X is the father of Y'
X - Y means 'X is the brother of Y',
X X Y means 'X is the sister of...