Question DSA-ARR-0031
EasyWhat does reversing an array in place cost?
- A.
O(log n) time
- B.
O(n) extra space
- 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
Arrays question
What does reversing an array in place cost?
O(log n) time
O(n) extra space
Sign up free to see the answer and a step-by-step explanation.
O(n) time and O(1) extra space
O(n²) time