← Questions
Maximum frequency stack
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Build a stack of integers with push(x) and pop(). pop removes and returns the value that occurs most often in the stack; when several values tie, it takes the one with an occurrence closest to the top. Say how fast each operation is.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
