Morgan Stanley OA 2026 | Secure Sliding Windows & Nodes at Distance K in Binary Tree

Question · Posted Jun 2026

Problem 1 - Maximize Unique Identifiers within Sliding Constraints Problem Statement You are given an integer array stream, a window size M, and a security threshold K. A sliding window of size M moves from left to right across the array. A window is considered secure if the number of elements that appear exactly once inside that window is at least K. Return the total number of secure windows. Constraints Constraint 1 ≤ N ≤ 100000 1 ≤ M ≤ ...

The full answer & interview discussion are available to premium members.

Log in Create a free account