Question DSA-STR-0038
EasyWhat is the time complexity of checking whether a string of length n is a palindrome?
- A.
O(log n)
- B.
O(1)
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Strings question
What is the time complexity of checking whether a string of length n is a palindrome?
O(log n)
O(1)
Sign up free to see the answer and a step-by-step explanation.
O(n²)
O(n)