PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Coding & Algorithms/Google

Solve Banana Speed and Interval Merge

Last updated: Apr 22, 2026

Quick Overview

This question set evaluates algorithmic problem-solving and data-structure competency: the minimum eating speed problem focuses on reasoning about rate-limited processing and search-over-answer-space strategies, while the interval merge problem tests interval manipulation, sorting, and overlap reasoning on arrays.

  • medium
  • Google
  • Coding & Algorithms
  • Software Engineer

Solve Banana Speed and Interval Merge

Company: Google

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

During two technical phone screens for a new graduate software engineering role, the candidate was asked to solve the following coding problems: 1. **Minimum eating speed** You are given an array `piles` where `piles[i]` is the number of bananas in the `i`-th pile, and an integer `h` representing the number of hours available. A person chooses an integer eating speed `k` bananas per hour. In each hour, they may eat from only one pile, consuming up to `k` bananas from that pile. If the pile contains fewer than `k` bananas, they eat the entire pile and do not continue eating from another pile during that hour. Return the minimum integer `k` such that all bananas can be eaten within `h` hours. 2. **Merge overlapping intervals** You are given an array `intervals` where `intervals[i] = [start_i, end_i]`. Merge all overlapping intervals and return a new array containing non-overlapping intervals that cover all ranges in the input. The output may be returned in sorted order by start time.

Quick Answer: This question set evaluates algorithmic problem-solving and data-structure competency: the minimum eating speed problem focuses on reasoning about rate-limited processing and search-over-answer-space strategies, while the interval merge problem tests interval manipulation, sorting, and overlap reasoning on arrays.

Related Interview Questions

  • Solve Flower Placement and Directory Deletion - Google (medium)
  • Compute Turnstile Crossing Times - Google (hard)
  • Simulate In-Place Cellular State Updates - Google (hard)
  • Determine Whether a Word Exists in a Graph - Google (medium)
  • Implement Checksums and Feature Rollout Evaluation - Google (medium)
Google logo
Google
Jan 27, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
3
0

During two technical phone screens for a new graduate software engineering role, the candidate was asked to solve the following coding problems:

  1. Minimum eating speed You are given an array piles where piles[i] is the number of bananas in the i -th pile, and an integer h representing the number of hours available. A person chooses an integer eating speed k bananas per hour. In each hour, they may eat from only one pile, consuming up to k bananas from that pile. If the pile contains fewer than k bananas, they eat the entire pile and do not continue eating from another pile during that hour. Return the minimum integer k such that all bananas can be eaten within h hours.
  2. Merge overlapping intervals You are given an array intervals where intervals[i] = [start_i, end_i] . Merge all overlapping intervals and return a new array containing non-overlapping intervals that cover all ranges in the input. The output may be returned in sorted order by start time.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

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