Question DSA-STK-0080
HardWhat is the 'celebrity problem' solved with a stack (or two pointers)?
- A.
Sorting people
- B.
Shortest paths
- 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 'celebrity problem' solved with a stack (or two pointers)?
Sorting people
Shortest paths
Sign up free to see the answer and a step-by-step explanation.
Counting friends
Finding the person everyone knows who knows nobody, using O(n) 'knows' questions