← Morgan Stanley Interview Insights

Morgan Stanley·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Morgan Stanley Data Scientist interview with a scheduling/greedy algorithm problem. Pretty straightforward coding round but the problem has some nuance worth thinking through carefully.

Questions Asked (1)

Q1

Given a list of meeting time intervals, each defined by a start and end time, find the maximum number of non-overlapping meetings you can attend. Meetings touching at a boundary (one ends where another starts) are considered non-overlapping and can both be attended.

Algorithms & Data Structures
Author's notes

Classic interval scheduling problem and I knew it was greedy the second I saw it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Recognize this as the classic interval scheduling maximization problem, which is solved optimally by a greedy algorithm: sort meetings by end time and iteratively select the next meeting that starts at or after the last selected meeting's end. Explain why this greedy choice works (earliest finish time leaves maximum room for remaining meetings) and analyze the time complexity.

Pro tip: In a data science context, connect the algorithm to real-world applications like scheduling computational jobs or resource allocation, and mention that the greedy approach is optimal for this problem—unlike many scheduling problems where greedy fails. This shows you understand both theory and practical implications.

1. Clarify and Restate the Problem

Confirm that intervals are half-open (end == start is non-overlapping) and that the goal is to maximize the count, not total duration. Ask if the input is sorted or if we can modify it.

2. Propose the Greedy Strategy

Sort meetings by end time ascending. Initialize a count and track the end time of the last selected meeting. Iterate through sorted meetings, selecting any whose start time is >= last end time.

3. Justify Correctness

Explain the exchange argument: choosing the meeting with the earliest finish time is always safe because it leaves at least as much room for subsequent meetings as any other choice.

4. Analyze Complexity and Edge Cases

State time complexity O(n log n) due to sorting, and space O(1) or O(n) depending on sorting implementation. Discuss edge cases: empty list, single meeting, all overlapping, all non-overlapping.

5. Connect to Data Science and Morgan Stanley Context

Mention applications like scheduling model training jobs, allocating analyst time, or optimizing trade execution windows. Highlight that this greedy algorithm is a fundamental building block in operations research.

Key Points to Mention

  • Greedy algorithm: sort by end time, then select compatible intervals
  • Proof of optimality via exchange argument
  • Time complexity O(n log n) and space complexity O(1) or O(n)
  • Handling of boundary condition: intervals touching at endpoints are non-overlapping
  • Comparison to other approaches (e.g., dynamic programming) and why greedy is better here
  • Real-world applications in scheduling and resource allocation

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.