PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Disney

Determine if chasing points will meet

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of pursuit curves, continuous dynamical systems, computational geometry, and numerical simulation, measuring the ability to reason about concurrent motion, convergence behavior, and numerical precision when multiple agents chase one another.

  • medium
  • Disney
  • Coding & Algorithms
  • Machine Learning Engineer

Determine if chasing points will meet

Company: Disney

Role: Machine Learning Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

You are given **N points** in 2D, indexed `0..N-1`, forming a cycle. - At time `t = 0`, point `i` is at coordinates `(xi, yi)`. - All points move **simultaneously** and continuously. - Each point moves with **constant speed** `v = 1`. - At any time `t`, point `i` moves in the direction of the **current position** of point `(i+1) mod N` (i.e., it “chases” the next point). ### Task Write a program that determines whether the points will **all meet at the same location at the same time**. If they do meet, output: 1. The meeting time `T`. 2. The meeting position `(X, Y)`. If they do **not** meet, output `NEVER`. ### Input - Integer `N` (`2 ≤ N ≤ 200`) - `N` lines of real numbers: `xi yi` ### Output - Either `NEVER`, or three real numbers `T X Y`. ### Requirements / Notes - Your numeric outputs should be within `1e-4` absolute error. - You may use numerical simulation (time-stepping) as long as it meets the error requirement and runs efficiently.

Quick Answer: This question evaluates understanding of pursuit curves, continuous dynamical systems, computational geometry, and numerical simulation, measuring the ability to reason about concurrent motion, convergence behavior, and numerical precision when multiple agents chase one another.

Related Interview Questions

  • Implement an LRU cache - Disney (medium)
  • Filter ads by a single rule - Disney (medium)
  • Solve matrix add, frequency count, longest consecutive - Disney (Medium)
  • Solve grid shortest path with BFS - Disney (Medium)
  • Implement BFS shortest path in grid - Disney (Medium)
Disney logo
Disney
Nov 1, 2025, 12:00 AM
Machine Learning Engineer
Technical Screen
Coding & Algorithms
5
0

You are given N points in 2D, indexed 0..N-1, forming a cycle.

  • At time t = 0 , point i is at coordinates (xi, yi) .
  • All points move simultaneously and continuously.
  • Each point moves with constant speed v = 1 .
  • At any time t , point i moves in the direction of the current position of point (i+1) mod N (i.e., it “chases” the next point).

Task

Write a program that determines whether the points will all meet at the same location at the same time.

If they do meet, output:

  1. The meeting time T .
  2. The meeting position (X, Y) .

If they do not meet, output NEVER.

Input

  • Integer N ( 2 ≤ N ≤ 200 )
  • N lines of real numbers: xi yi

Output

  • Either NEVER , or three real numbers T X Y .

Requirements / Notes

  • Your numeric outputs should be within 1e-4 absolute error.
  • You may use numerical simulation (time-stepping) as long as it meets the error requirement and runs efficiently.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Disney•More Machine Learning Engineer•Disney Machine Learning Engineer•Disney Coding & Algorithms•Machine Learning 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.