# Rotation and Reversal Array Operation MCQs

Q1. Which of the following is the predefined function for array reversal in C++?.

A. rotate().

B. arr_rotate().

C. array_rotate().

D. rot().

Q2. How many arguments are required by the predefined function rotate() in C++?.

A. 1.

B. 2.

C. 3.

D. 4.

Q3. Predefined function rotate() in C++ is available under which header file?.

A. math.

B. stdio.

C. stdlib.

D. algorithm.

Q4. Which of the following algorithm to rotate an array has the maximum time complexity?.

A. rotate elements one by one.

B. juggling algorithm.

C. reversal algorithm.

D. using a temporary array.

Answer= rotate elements one by one

Q5. What is the time complexity of the juggling algorithm to rotate an array?.

A. O(1).

B. O(n).

C. O(d).

D. O(n*d).

Q6. Reversal algorithm and juggling algorithm for array rotation have the same time complexity..

A. TRUE.

B. FALSE.

C.  Nothing Can be said.

D.  None of the mentioned.

Q7. What will be the minimum number of jumps required to reach the end of the array arr[] = {1,3,6,3,6,8,5}?.

A. 1.

B. 2.

C. 3.

D. not possible to reach the end.

Q8. What will be the minimum number of jumps required to reach the end of the array arr[] ={0,1,3,6,3,6,8,5}?.

A. 1.

B. 2.

C. 3.

D. not possible to reach the end.

Answer= not possible to reach the end

Q9. What will be the minimum number of jumps required to reach the end of the array arr[] = {1,2,0,0,3,6,8,5}?.

A. 1.

B. 2.

C. 3.

D. not possible to reach the end.

Answer= not possible to reach the end

Q10. It is not possible to find the minimum number of steps to reach the end of an array in linear time..

A. TRUE.

B. FALSE.

C.  Nothing can be said.

D.  None of the mentioned.

Q11. In how many different ways we can reach the end of the array arr[]={1,3,5,8,9}?.

A. 1.

B. 2.

C. 3.

D. 4.

Q12. It is not possible to reach the end of an array if any element of the array is 0..

A. TRUE.

B. FALSE.

C.  Nothing can be said.

D.  None of the mentioned.

Q13. What is the minimum possible time complexity to find the number of steps to reach the end of an array?.

A. O(n).

B. O(n2).

C. O(n3/2).

D. O(1).

Q14. What is a skip list?.

A. a linkedlist with size value in nodes.

B. a linkedlist that allows faster search within an ordered sequence.

C. a linkedlist that allows slower search within an ordered sequence.

D. a tree which is in the form of linked list.

Q15. Consider the 2-level skip listHow to access 38?.

A. travel 20-30-35-38.

B. travel 20-30-40-38.

C. travel 20-38.

D. travel 20-40-38.