PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Confluent

Process pod logs with global increments and pop-min

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of data structures—particularly priority queues/heaps—and techniques for efficiently handling global/bulk updates and minimum extraction under changing offsets.

  • easy
  • Confluent
  • Coding & Algorithms
  • Software Engineer

Process pod logs with global increments and pop-min

Company: Confluent

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: easy

Interview Round: Technical Screen

You are given an event log for a system of “pods.” Each event is a pair `[status, value]`: - `status == 1`: Add a new pod with **initial load** = `value`. - `status == 2`: Increase the load of **every existing pod** by `value` (a global increment). - `status == 3`: Remove the pod with the **smallest current load** and **output/record** that pod’s current load. (For `status == 3`, the `value` field can be ignored.) Return a list of the loads produced by every `status == 3` operation, in order. ### Example Input: `logs = [[1, 5], [1, 2], [2, 3], [3, 0], [3, 0]]` Process: - add pod(5) - add pod(2) - +3 to all ⇒ loads become (8, 5) - pop min ⇒ output 5 - pop min ⇒ output 8 Output: `[5, 8]` ### Notes / assumptions - It is guaranteed that a `status == 3` event will not occur when there are no pods. - Use 64-bit integers if needed. - Aim for an efficient solution (e.g., better than O(n) per global increment).

Quick Answer: This question evaluates understanding of data structures—particularly priority queues/heaps—and techniques for efficiently handling global/bulk updates and minimum extraction under changing offsets.

Related Interview Questions

  • Implement Tail and Find Monster Cost - Confluent (medium)
  • Solve Signature, File, and Queue Problems - Confluent (medium)
  • Implement File Tail and Sensor Health - Confluent (medium)
  • Rank songs by pairwise user preferences - Confluent (medium)
  • Implement tail N lines - Confluent (Medium)
Confluent logo
Confluent
Feb 12, 2026, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
12
0
Loading...

You are given an event log for a system of “pods.” Each event is a pair [status, value]:

  • status == 1 : Add a new pod with initial load = value .
  • status == 2 : Increase the load of every existing pod by value (a global increment).
  • status == 3 : Remove the pod with the smallest current load and output/record that pod’s current load. (For status == 3 , the value field can be ignored.)

Return a list of the loads produced by every status == 3 operation, in order.

Example

Input: logs = [[1, 5], [1, 2], [2, 3], [3, 0], [3, 0]]

Process:

  • add pod(5)
  • add pod(2)
  • +3 to all ⇒ loads become (8, 5)
  • pop min ⇒ output 5
  • pop min ⇒ output 8

Output: [5, 8]

Notes / assumptions

  • It is guaranteed that a status == 3 event will not occur when there are no pods.
  • Use 64-bit integers if needed.
  • Aim for an efficient solution (e.g., better than O(n) per global increment).

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Confluent•More Software Engineer•Confluent Software Engineer•Confluent Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.