PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Pinterest

Find minimal time to serve customers

Last updated: Mar 29, 2026

Quick Overview

This question evaluates algorithm design and mathematical reasoning for rate-based scheduling, including aggregate capacity computation, integer arithmetic, correctness proof, and analysis of edge cases.

  • Medium
  • Pinterest
  • Coding & Algorithms
  • Software Engineer

Find minimal time to serve customers

Company: Pinterest

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

You manage a bank with k tellers; teller i takes serviceTimes[i] minutes to serve one customer and works continuously. Given an integer array serviceTimes and an integer m (customers to serve), return the minimum integer time T such that sum over i of floor(T / serviceTimes[i]) >= m. Describe your algorithm, prove correctness, analyze time/space complexity, and implement it. Discuss edge cases (very large m, slow tellers, identical rates).

Quick Answer: This question evaluates algorithm design and mathematical reasoning for rate-based scheduling, including aggregate capacity computation, integer arithmetic, correctness proof, and analysis of edge cases.

Related Interview Questions

  • Hierarchical Access Control for an Advertising Platform - Pinterest (medium)
  • First Word Matching Each Prefix Query - Pinterest (medium)
  • Maximize Boxes Stored Through One Entrance - Pinterest (medium)
  • Solve Multiple Coding Interview Problems - Pinterest (medium)
  • Implement a Sparse Matrix Class - Pinterest (medium)
Pinterest logo
Pinterest
Jul 28, 2025, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
5
0

You manage a bank with k tellers; teller i takes serviceTimes[i] minutes to serve one customer and works continuously. Given an integer array serviceTimes and an integer m (customers to serve), return the minimum integer time T such that sum over i of floor(T / serviceTimes[i]) >= m. Describe your algorithm, prove correctness, analyze time/space complexity, and implement it. Discuss edge cases (very large m, slow tellers, identical rates).

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

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

Master your tech interviews with 8,000+ 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.