PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Nextdoor

Merge Weekly Time Intervals

Last updated: Apr 21, 2026

Quick Overview

This question evaluates understanding of interval-merging algorithms and temporal data normalization, testing competency in handling time-based ranges, overlap detection, and chronological ordering within the Coding & Algorithms domain.

  • medium
  • Nextdoor
  • Coding & Algorithms
  • Software Engineer

Merge Weekly Time Intervals

Company: Nextdoor

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

You are given a list of time intervals within a single week. Each time is written as a day-of-week plus a 24-hour clock, for example `Sat 13:00` or `Mon 09:30`. Each interval has the form `[start, end]`, where `start` and `end` are timestamps in the same weekly timeline, and `start <= end`. Write a function that merges all overlapping intervals and returns the merged result in chronological order. Example input: - `[Mon 09:00, Mon 11:00]` - `[Mon 10:30, Mon 12:00]` - `[Sat 13:00, Sat 14:00]` - `[Sat 13:30, Sat 15:00]` Example output: - `[Mon 09:00, Mon 12:00]` - `[Sat 13:00, Sat 15:00]` You should explain how to parse the weekday/time format into a comparable numeric value, then apply interval merging efficiently.

Quick Answer: This question evaluates understanding of interval-merging algorithms and temporal data normalization, testing competency in handling time-based ranges, overlap detection, and chronological ordering within the Coding & Algorithms domain.

Related Interview Questions

  • Group Photos and Sort Feed Items - Nextdoor (medium)
  • Simulate Transaction Lock Scheduling - Nextdoor (hard)
  • Build Ranked Feed With Photo Batching - Nextdoor (medium)
  • Merge overlapping weekly time intervals - Nextdoor (medium)
  • Write SQL for app metrics - Nextdoor (hard)
Nextdoor logo
Nextdoor
Mar 16, 2026, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
9
0

You are given a list of time intervals within a single week. Each time is written as a day-of-week plus a 24-hour clock, for example Sat 13:00 or Mon 09:30.

Each interval has the form [start, end], where start and end are timestamps in the same weekly timeline, and start <= end.

Write a function that merges all overlapping intervals and returns the merged result in chronological order.

Example input:

  • [Mon 09:00, Mon 11:00]
  • [Mon 10:30, Mon 12:00]
  • [Sat 13:00, Sat 14:00]
  • [Sat 13:30, Sat 15:00]

Example output:

  • [Mon 09:00, Mon 12:00]
  • [Sat 13:00, Sat 15:00]

You should explain how to parse the weekday/time format into a comparable numeric value, then apply interval merging efficiently.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

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

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