PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCareers
|Home/Coding & Algorithms/Bloomberg

Find maximum cable length by cutting

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's proficiency in algorithm design, particularly applying binary search over a monotonic answer space and managing integer versus floating-point precision when maximizing piece length.

  • Medium
  • Bloomberg
  • Coding & Algorithms
  • Software Engineer

Find maximum cable length by cutting

Company: Bloomberg

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

You are given N cables with integer lengths and a target K. Cut the cables into pieces of equal integer length L to produce at least K pieces; maximize L. If impossible, return 0. Describe an algorithm using binary search on the answer and analyze its complexity. Follow up: support non-integer lengths with precision 1e-3.

Quick Answer: This question evaluates a candidate's proficiency in algorithm design, particularly applying binary search over a monotonic answer space and managing integer versus floating-point precision when maximizing piece length.

Related Interview Questions

  • Solve meeting and tree problems - Bloomberg (easy)
  • Minimize travel cost with two cities - Bloomberg (easy)
  • Check connectivity between two subway stations - Bloomberg (easy)
  • Design a data structure for dynamic top‑K frequency - Bloomberg (hard)
  • Find tree root and bucket numbers - Bloomberg (hard)
Bloomberg logo
Bloomberg
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
3
0

You are given N cables with integer lengths and a target K. Cut the cables into pieces of equal integer length L to produce at least K pieces; maximize L. If impossible, return 0. Describe an algorithm using binary search on the answer and analyze its complexity. Follow up: support non-integer lengths with precision 1e-3.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Bloomberg•More Software Engineer•Bloomberg Software Engineer•Bloomberg 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
  • Careers
  • 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.