FastPrepMin Stack
Problems/Min Stack

Min Stack

Bloomberg LP logoBloomberg LP● MediumNEW GRADPHONE SCREENONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in many firsthand Bloomberg new-grad phone and onsite interviews. In our version, the operations come as one batch, and you return the values for pop, top and getMin.

Process operations on a stack that can return its current minimum in constant time.

  • push x pushes integer x and produces no output.
  • pop removes and returns the top value.
  • top returns the top value without removing it.
  • getMin returns the smallest value currently in the stack.

Return the outputs of every operation except push, in encounter order.

Function

processMinStack(operations: String[]) → int[]

Examples

Example 1

operations = ["push -2","push 0","push -3","getMin","pop","top","getMin"]return = [-3,-3,0,-2]

The minimum becomes -3. Popping returns -3, exposing top 0 and minimum -2.

Example 2

operations = ["push 2","push 2","getMin","pop","getMin"]return = [2,2,2]

Duplicate minima are tracked independently, so one pop leaves the same minimum.

Constraints

  • 1 <= operations.length <= 10^5.
  • Pushed values are 32-bit signed integers.
  • Every pop, top, and getMin operation is issued on a nonempty stack.

More Bloomberg LP Phone Screen questions

  • N-ary Index-Path Encoder and DecoderPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Trapping Rain WaterPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Word SearchOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Fewest Coins CombinationPHONE SCREEN · Seen Nov 2026
  • Recommend Films from Viewers Who Watched Everything You DidPHONE SCREEN · Seen Nov 2026
  • Track New Values in Sorted OrderPHONE SCREEN · Seen Nov 2026
  • Design Browser HistoryPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Mutable Stock Price Top KPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Sparse Vector and Matrix OperationsPHONE SCREEN · Seen Oct 2026
  • Add Two Numbers IIPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026

Similar questions at other companies

  • Billing Log with Undo and RedoReddit · PHONE SCREENReddit interview questions
  • KV Store with Nested TransactionsApplied Intuition · PHONE SCREEN · ONSITE INTERVIEWApplied Intuition interview questions
  • Min StackDP World · ONSITE INTERVIEW
  • Multiline Text Editor with Cursor MovementDatologyAI · PHONE SCREEN
  • Code Editor FoldingJane Street · ONSITE INTERVIEWJane Street interview questions
  • Layer History with Batch Undo and RedoFigma · OA · PHONE SCREENFigma interview questions
  • Stack with Constant-Time Middle QueriesAmazon · PHONE SCREEN
  • In-Memory Database with Transactions and SavepointsNextdoor · PHONE SCREENNextdoor interview questions
  • Undo and Redo Command HistoryNetflix · ONSITE INTERVIEWNetflix interview questions
  • Min StackMicrosoft · PHONE SCREEN · ONSITE INTERVIEWMicrosoft interview questions

Interview reports that mention this question

  • Bloomberg Interview Questions, Level Not Reported: 65 Questions
  • Bloomberg Experienced Design & More: 126 Questions (Part 2 of 2)
  • Bloomberg New Grad Coding Questions: 121 Questions (Part 2 of 2)
  • Bloomberg New Grad Interviews: 2025 vs 2026 Guide
  • Bloomberg New Grad Screens: 30 Experiences (Part 4 of 5)

Bloomberg LP interview experiences

  • Bloomberg AI-Assisted Coding Round, All Levels: 14 Experiences
All Bloomberg LP interview questionsSee Bloomberg LP hiring insights
Saved
class Solution {
    public int[] processMinStack(String[] operations) {
      // Write your code here.
    }
}
Checking account…