FastPrepDesign HashMap
Problems/Design HashMap

Design HashMap

Bloomberg LP logoBloomberg LP● EasyNEW GRADPHONE SCREENONSITE INTERVIEW

Updated Sep 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a first-hand Bloomberg new-grad interview as implementing a hash map from scratch.

Process put, get, and remove operations without using a built-in hash-table implementation for the stored map. Get returns the value or -1 when absent. Return "null" for put and remove operations.

Function

runHashMap(operations: String[], keys: int[], values: int[]) → String[]

Examples

Example 1

operations = ["put","put","get","get","put","get","remove","get"]keys = [1,2,1,3,2,2,2,2]values = [1,2,0,0,1,0,0,0]return = ["null","null","1","-1","null","1","null","-1"]

The second put updates key 2, and remove makes its later get return -1.

Constraints

  • All arrays have equal non-zero length.
  • 0 <= key <= 1000000
  • 0 <= value <= 1000000
  • There are at most 100000 operations.

More Bloomberg LP Phone Screen questions

  • Pascal's TrianglePHONE SCREEN · ONSITE INTERVIEW · Seen Dec 2026
  • Valid Triangle NumberPHONE SCREEN · ONSITE INTERVIEW · Seen Dec 2026
  • Collatz Conjecture with Shared MemoizationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Word SearchOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • N-ary Index-Path Encoder and DecoderPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Trapping Rain WaterPHONE 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

Similar questions at other companies

  • Design Hash MapGoldman Sachs · OA · PHONE SCREENGoldman Sachs interview questions
  • Logger Rate LimiterGoogle · PHONE SCREENGoogle interview questions
  • Config Store with Priority OverridesMicrosoft · PHONE SCREENMicrosoft interview questions
  • ID Allocator with Assign and ReleaseSnap Inc. · PHONE SCREENSnap Inc. interview questions
  • Feature Flag EvaluationCVS Health · PHONE SCREEN
  • Cache an Expensive Service Across ThreadsOracle · ONSITE INTERVIEWOracle interview questions
  • Bounded Service Instance RegistryRevolut · PHONE SCREENRevolut interview questions
  • Smart Queue of Latest PricesCitadel · PHONE SCREENCitadel interview questions
  • Mutable Record Store with Error ResultsSquarepoint Capital · ONSITE INTERVIEWSquarepoint Capital interview questions
  • In-Memory Key-Value Store OperationsOpenAI · PHONE SCREENOpenAI interview questions

Bloomberg LP interview experiences

  • Bloomberg AI-Assisted Coding Round, All Levels: 14 Experiences
  • Bloomberg SWE Intern Interview Questions: 68 Questions
  • Bloomberg Interview Questions, Level Not Reported: 65 Questions
  • Bloomberg Experienced Design & More: 126 Questions (Part 2 of 2)
  • Bloomberg Experienced SWE Interviews: 167 Questions (Part 1 of 2)
  • Bloomberg New Grad Coding Questions: 121 Questions (Part 2 of 2)
All Bloomberg LP interview questionsSee Bloomberg LP hiring insights
Saved
class Solution {
    public String[] runHashMap(String[] operations, int[] keys, int[] values) {
      // Write your code here.
    }

}
Checking account…