Question DSA-STK-0073
HardWhat is the time complexity of the 'largest rectangle in a histogram' solution using a stack?
- A.
O(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
Stacks question
What is the time complexity of the 'largest rectangle in a histogram' solution using a stack?
O(n²)
O(1)
Sign up free to see the answer and a step-by-step explanation.
O(n log n)
O(n)