PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Point72

Solve date, shopping, and circle problems

Last updated: Mar 29, 2026

Quick Overview

This multi‑part problem evaluates skills in robust date/time parsing and timezone normalization with business‑day arithmetic, dynamic programming and memoization for constrained bundle selection and cost minimization, and computational geometry for circle relationship classification and intersection point computation.

  • hard
  • Point72
  • Coding & Algorithms
  • Data Scientist

Solve date, shopping, and circle problems

Company: Point72

Role: Data Scientist

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Take-home Project

You have three independent coding tasks: A) Date normalization and business-day delta - Input: a list of strings with mixed, possibly ambiguous date/time formats, e.g., ["2025/02/28 23:59 PST", "28-02-2025", "02/03/25", "2025-02-29", "Mar 1, 2025 01:30 +0530"]. Normalize each to strict UTC ISO 8601 "YYYY-MM-DDTHH:MM:SSZ". - Disambiguation rules: if a date is of the form dd/mm/yy or mm/dd/yy, treat as dd/mm/yy when the first number > 12; otherwise default to mm/dd/yy. Two‑digit years map 00–68 → 2000–2068, 69–99 → 1969–1999. Validate leap years. If a timezone is absent, assume local time is UTC−08:00; then convert to UTC. - Then, given any two normalized instants, compute business-day difference between their dates (ignore time-of-day), excluding weekends and a provided holiday set H = {2025-01-01, 2025-07-04, 2025-12-25}. Return an integer that can be negative. - Edge cases to handle: invalid dates (return an error with the offending token), Feb 29 on non‑leap years, zero-length input, and timezone offsets like +05:45. B) Arbitrary shopping with bundles (DP/memoization) - You are given: target quantities T over up to 6 item types, unit prices P, and a list of special bundles (each bundle is a vector of item counts plus a bundle price). Compute the minimum total cost to satisfy T exactly; if impossible, return −1. Also return one optimal combination of bundles and leftover unit purchases. - Example: T = {A:3, B:2}, P = {A:5, B:4} Bundles = [b1: {A:2, B:1} @ 12, b2: {A:3, B:0} @ 13] Output: min_cost and a decomposition (e.g., b1×1 + unit A×1 + unit B×1). - Constraints: 0 ≤ T[i] ≤ 6, 1 ≤ |Bundles| ≤ 20, prices are nonnegative integers. Require a solution with pruning and memoization over states; state space must not exceed 7^k for k item types. - Edge cases: zero-cost bundles, dominated bundles, and bundles that oversupply (not allowed). C) Circle‑relationship classifier with numerics - Implement a function relate((x1, y1, r1), (x2, y2, r2), eps=1e-9) that returns one of: {"separate", "externally_tangent", "intersecting", "internally_tangent", "contained_no_touch", "concentric_equal", "concentric_distinct"}. - Use squared distances to avoid precision loss; treat values within eps as equal. Radii may be zero. If "intersecting", also return the two intersection points (ordered by x then y), or one point if tangency detected within eps. - Edge cases: coincident centers, one or both radii zero, very large coordinates (|x|,|y| ≤ 1e9), and near‑tangency scenarios where |d − (r1±r2)| < eps.

Quick Answer: This multi‑part problem evaluates skills in robust date/time parsing and timezone normalization with business‑day arithmetic, dynamic programming and memoization for constrained bundle selection and cost minimization, and computational geometry for circle relationship classification and intersection point computation.

Related Interview Questions

  • Solve SQL and PySpark Data Tasks - Point72 (easy)
  • Implement Portfolio Trading Optimizer - Point72 (hard)
  • Implement Election Report and Banking Pipeline - Point72 (hard)
  • Find the Smallest String After One Decrement - Point72 (medium)
  • Implement composition and mixin utilities - Point72 (hard)
Point72 logo
Point72
Oct 13, 2025, 9:49 PM
Data Scientist
Take-home Project
Coding & Algorithms
3
0

Take‑Home: Three Independent Tasks (Data/Algorithms)

Implement three independent functions that will be unit‑tested separately. Provide clear error handling and document assumptions. Keep solutions efficient and robust to edge cases.

A) Date Normalization and Business‑Day Difference

  • Input: a list of strings with mixed, possibly ambiguous date/time formats (may include timezone abbreviations or numeric offsets), e.g.,
    • ["2025/02/28 23:59 PST", "28-02-2025", "02/03/25", "2025-02-29", "Mar 1, 2025 01:30 +0530"]
  • Normalize each string to strict UTC ISO 8601 format: "YYYY-MM-DDTHH:MM:SSZ".
  • Disambiguation rules:
    1. Ambiguous slashed dates: if form dd/mm/yy or mm/dd/yy, treat as dd/mm/yy when the first number > 12; otherwise default to mm/dd/yy.
    2. Two‑digit years: map 00–68 → 2000–2068, and 69–99 → 1969–1999.
    3. Validate leap years properly.
    4. If no timezone is present, assume local time is UTC−08:00; then convert to UTC.
  • Then, given any two normalized instants, compute the business‑day difference between their dates (ignore time‑of‑day):
    • Exclude weekends (Saturday, Sunday) and a holiday set H = {2025-01-01, 2025-07-04, 2025-12-25}.
    • Return a signed integer (can be negative). Define the difference as the count of business days in the half‑open interval [date1, date2).
  • Edge cases to handle:
    • Invalid dates (return an error including the offending token).
    • Feb 29 on non‑leap years.
    • Zero‑length input list.
    • Timezone offsets with minutes (e.g., +05:45).

Deliverables:

  • A function normalize_dates(list[str]) → list[str] (or an error with the offending token).
  • A function business_day_diff(iso_utc_1: str, iso_utc_2: str, holidays: set[str]) → int.

B) Arbitrary Shopping with Bundles (DP/Memoization)

  • You are given:
    • Target quantities T over up to 6 item types.
    • Unit prices P for each item type.
    • A list of special bundles; each bundle is a vector of item counts plus a bundle price.
  • Compute the minimum total cost to satisfy T exactly (oversupply not allowed). If impossible, return −1. Also return one optimal combination of bundles and leftover unit purchases.
  • Example:
    • T = {A: 3, B: 2}, P = {A: 5, B: 4}
    • Bundles = [b1: {A: 2, B: 1} @ 12, b2: {A: 3, B: 0} @ 13]
    • Output: min_cost and a decomposition (e.g., b1×1 + unit A×1 + unit B×1).
  • Constraints:
    • 0 ≤ T[i] ≤ 6, 1 ≤ |Bundles| ≤ 20, prices are nonnegative integers.
    • Require pruning and memoization over states; state space must not exceed 7^k for k item types.
  • Edge cases:
    • Zero‑cost bundles.
    • Dominated bundles.
    • Bundles that oversupply any item are not allowed in a step.

Deliverable:

  • A function shop_min_cost(T, P, Bundles) → (min_cost: int, decomposition: any suitable structured description). Use DP with memoization over remaining needs.

C) Circle‑Relationship Classifier with Intersection Points

  • Implement relate((x1, y1, r1), (x2, y2, r2), eps=1e-9) that returns one of:
    • {"separate", "externally_tangent", "intersecting", "internally_tangent", "contained_no_touch", "concentric_equal", "concentric_distinct"}.
  • Requirements:
    • Use squared distances where possible to avoid precision loss; treat values within eps as equal.
    • Radii may be zero.
    • If the relation is "intersecting", also return the two intersection points (ordered by x then y). If tangency is detected within eps, return the single point.
  • Edge cases:
    • Coincident centers.
    • One or both radii zero.
    • Very large coordinates (|x|,|y| ≤ 1e9).
    • Near‑tangency where |d − (r1±r2)| < eps.

Deliverable:

  • A function relate(c1, c2, eps=1e-9) → {relation: str, points: list[tuple[float, float]]}.

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Point72•More Data Scientist•Point72 Data Scientist•Point72 Coding & Algorithms•Data Scientist 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.