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.
1.6k
0
Do you find this helpful?
15

Discussion

No comments yet