PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Liftoff

Compute the Eddington number from ride distances

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's competence in array manipulation, ordering/selection techniques, counting thresholds, and algorithmic complexity analysis required to compute the Eddington number.

  • medium
  • Liftoff
  • Coding & Algorithms
  • Software Engineer

Compute the Eddington number from ride distances

Company: Liftoff

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Given a list of positive integers `distances`, where `distances[i]` is the distance traveled on day `i`, compute the cyclist’s **Eddington number** `E`: `E` is the largest integer such that there are at least `E` days with distance **≥ E**. Return `E`. Examples: - `distances = [1, 3, 3, 5, 6]` → `E = 3` (three days have distance ≥ 3) - `distances = [10, 8, 5, 4, 3]` → `E = 4` (four days have distance ≥ 4) - `distances = [1, 1, 1]` → `E = 1` Constraints: `1 ≤ n ≤ 2e5`, `1 ≤ distances[i] ≤ 1e9`. Aim for an efficient solution.

Quick Answer: This question evaluates a candidate's competence in array manipulation, ordering/selection techniques, counting thresholds, and algorithmic complexity analysis required to compute the Eddington number.

Related Interview Questions

  • Find degrees of connection in a LinkedIn graph - Liftoff (medium)
  • Parse and expand an IPv6 address - Liftoff (medium)
  • Implement minimal RLE encode/decode with max run K - Liftoff (medium)
Liftoff logo
Liftoff
Feb 26, 2026, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
1
0

Given a list of positive integers distances, where distances[i] is the distance traveled on day i, compute the cyclist’s Eddington number E:

E is the largest integer such that there are at least E days with distance ≥ E.

Return E.

Examples:

  • distances = [1, 3, 3, 5, 6] → E = 3 (three days have distance ≥ 3)
  • distances = [10, 8, 5, 4, 3] → E = 4 (four days have distance ≥ 4)
  • distances = [1, 1, 1] → E = 1

Constraints: 1 ≤ n ≤ 2e5, 1 ≤ distances[i] ≤ 1e9. Aim for an efficient solution.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

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

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