FastPrepRisk-Priority Detection Store
Problems/Risk-Priority Detection Store

Risk-Priority Detection Store

Crowdstrike logoCrowdstrike● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Crowdstrike phone screen. The code skeleton in the report defines Put and GetNext, ordered by risk score. We chose what replacement does, how ties break, what happens when empty, and how a batch is written. Our version is about 86% the same as the reported question.

Process operations "PUT id score" and "GET". PUT inserts or replaces the detection with that id. GET removes and returns the id with the highest risk score; break ties by lexicographically smaller id. Return an empty string for GET on an empty store.

Return the sequence of GET results.

Function

processDetections(operations: String[]) → String[]

Examples

Example 1

operations = ["PUT a 5","PUT b 9","GET","GET"]return = ["b","a"]

The higher-risk detection is returned first.

Example 2

operations = ["GET"]return = [""]

An empty store returns the empty sentinel.

Constraints

  • 1 <= operations.length <= 5000.
  • Ids are nonempty lowercase strings; scores are nonnegative 32-bit integers.

Source note: Author-written prompt excerpt retained for source fidelity.

More Crowdstrike interview questions

  • Single-Condition Product FilterPHONE SCREEN · Seen Oct 2026
  • Number of IslandsONSITE INTERVIEW · Seen Nov 2025

Similar questions at other companies

  • Business Account KYC Verification — Parts 1–5Stripe · PHONE SCREENStripe interview questions
  • In-Memory Filesystem CommandsPerplexity AI · PHONE SCREEN · ONSITE INTERVIEWPerplexity AI interview questions
  • Route Pattern MatcherGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • File Storage ServiceCresta · PHONE SCREENCresta interview questions
  • String Interpolation with a Missing-Value ModeMongoDB · PHONE SCREENMongoDB interview questions
  • Dasher Pay with Store Waits and Peak HoursDoorDash · PHONE SCREENDoorDash interview questions
  • Return Every Matching DecryptionDuolingo · PHONE SCREENDuolingo interview questions
  • Design a Food Rating SystemApple · PHONE SCREENApple interview questions
  • Key-Value Store on a Block DeviceLambda · PHONE SCREEN
  • Fixed-Order Task Run Time With CooldownWaymo · PHONE SCREENWaymo interview questions
All Crowdstrike interview questionsSee Crowdstrike hiring insights
Saved
class Solution {
    public String[] processDetections(String[] operations) {
        // Write your code here.
    }
}
Checking account…