PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Machine Learning/Uber

Implement convex minimization on an interval

Last updated: May 1, 2026

Quick Overview

This question evaluates understanding of convex optimization for black-box real-valued functions on a closed interval, testing algorithm selection, stopping criteria, time/space complexity, function-evaluation efficiency, and numerical robustness in handling flat regions and boundary optima.

  • medium
  • Uber
  • Machine Learning
  • Machine Learning Engineer

Implement convex minimization on an interval

Company: Uber

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Technical Screen

Implement in Python an algorithm to minimize a black-box convex function F(x) over a closed interval [a, b] using only function evaluations. Choose and justify an appropriate method (e.g., golden-section search or ternary search), specify stopping criteria (tolerance and maximum iterations), analyze time/space complexity and the number of function evaluations, and discuss handling of numerical precision, non-strict convexity, flat regions, and boundary optima. Provide code and explain how you would test and verify correctness.

Quick Answer: This question evaluates understanding of convex optimization for black-box real-valued functions on a closed interval, testing algorithm selection, stopping criteria, time/space complexity, function-evaluation efficiency, and numerical robustness in handling flat regions and boundary optima.

Related Interview Questions

  • Evaluate Promotions for Uber Eats Users - Uber (medium)
  • Implement Streaming Clustering for Numbers - Uber
  • Build cold-start restaurant ratings - Uber (medium)
  • Implement CLIP Contrastive Loss - Uber (medium)
  • Predict driver acceptance - Uber (medium)
Uber logo
Uber
Aug 10, 2025, 12:00 AM
Machine Learning Engineer
Technical Screen
Machine Learning
12
0

Task: Minimize a Black-Box Convex Function on [a, b] Using Only Function Evaluations

Context

You are given a real-valued, convex function F(x) defined on a closed interval [a, b]. The function is a black box: you can evaluate F(x) at chosen x but cannot access derivatives or internal structure.

Requirements

Implement in Python an algorithm to find x* ∈ [a, b] that minimizes F(x), using only function evaluations. Specifically:

  1. Choose and justify an appropriate method (e.g., golden-section search or ternary search).
  2. Specify stopping criteria (tolerance and maximum iterations).
  3. Analyze time and space complexity and the number of function evaluations.
  4. Discuss handling of:
    • Numerical precision
    • Non-strict convexity and flat regions
    • Boundary optima
  5. Provide clear, well-documented code.
  6. Explain how you would test and verify correctness.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Machine Learning•More Uber•More Machine Learning Engineer•Uber Machine Learning Engineer•Uber Machine Learning•Machine Learning Engineer Machine Learning
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.