MCQOPTIONS
Bookmark
Saved Bookmarks
→
Data Structures and Algorithms
→
Evaluation Infix Expression Not Parenthesized
→
What is the time complexity of the above code used...
1.
What is the time complexity of the above code used to reverse a string?
A.
O(1)
B.
O(n)
C.
O(n<sup>2</sup>)
D.
O(n<sup>3</sup>)
Answer» B. O(n)
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
In which of the following cases is the reversal of a string not equal to the original string?
How many times is the function recursive_reverse_string() called when the following code is executed?
Consider the following recursive implementation used to reverse a string: Which of the following lines should be inserted to complete the above code?
Consider the following iterative implementation used to reverse a string: Which of the following lines should be inserted to complete the above code?
What is the time complexity of the above code used to reverse a string?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies