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
πŸ’¬ Discuss
βœ… Correct 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.

Explanation by: Mr. Dubey
the main purpose of the above code is to check if a string is a palindrome.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
944
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
90%
Success Rate