Notifications Mark All Read
Currently there is no PrepInsta Explanation. Did you know?
You can also submit your own version of explanations under user explanation section and also view other submitted explanations by other users.
Please login to submit your explanation
You can check your performance of this question after Login/Signup
so the answer is 15
In this pseudo code, the for loop operates from n = 6 until n < 9.
In the first iteration we have the value of n = 6, s = 0 + 6 = 6.
In the next iteration we have the value of n = 7, s = 6 + 7 = 13.
In the third iteration we have the value of n = 8, s = 13 + 8 = 21.
The next iteration wouldn't be executed since the condition of the loop n < 9 becomes false. And thus the loop terminates.
So the final answer we get is 21.
(C)Explanation: When first element or last element is chosen as pivot, Quick Sort‘s worst case occurs for the sorted arrays.In every step of quick sort, numbers are divided as per the following recurrence.T(n) = T(n-1) + O(n)
Post order Traversal : LEFT> RIGHT >ROOT
Please login to report
Buy Capgemini Pseudo Code Paid Materials
Join Capgemini Online Classes
You can check your score after Login/Signup
Your global Capgemini Ranking
Your Capgemini- Pseudo Code Ranking
Your Quiz-1 Percentile Ranking
The percentile data will be refreshed at 11:59 PM everyday
Completed - 0/10
Average time Per Question - 0