McqMate
| Q. |
What is the time complexity of the above code used to reverse a string? |
| A. | copies a string to another string |
| B. | compares two strings |
| C. | reverses a string |
| D. | checks if a string is a palindrome |
| Answer» D. checks if a string is a palindrome | |
| Explanation: the main purpose of the above code is to check if a string is a palindrome. | |
View all MCQs in
Design and Analysis of AlgorithmsNo comments yet