I need a detailed answer please, this is a review for my upcoming exam
What is the worst case time complexity of insertion sort for sorting n elements? Theta(n^2). O is OK, but Ohm is not. Grading is binary. Is the longest root-leaf path in a decision tree related to the best-case time complexity of the corresponding sorting algorithm or the worst-case time complexity of the corresponding sorting algorithm? Answer: worst-case. Grading is binary. Draw part of the decision tree for insertion sort on 4 distinct elements (a_1, a_2, a_3, a_4) which includes the path from the root node to the leaf node . You have to label each node with the comparison (in the form a_i lessthanorequalto a_j?) made at the node and label each edge with YES or NO. [a_1 lessthanorequalto a_2], Y, [a_2 lessthanorequalto a_3], N, [a_1 lessthanorequalto a_33], Y, [a_2 lessthanorequalto a_4], N, [a_3 lessthanorequalto a_4], Y, [a_1 a_4, a-3, a_2] Grading: 1 pt each until the first mistake.