Implement sampling and subarray algorithms

Quick Overview

Solve uniform 2D square sampling and longest increasing contiguous subarray. The solution maps Uniform(0,1) to Uniform(-1,1), proves uniformity by independence, and gives O(n) one-pass subarray algorithms with index recovery and edge cases.

Implement sampling and subarray algorithms

Company: Google

Role: Data Scientist

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

Quick Answer: Solve uniform 2D square sampling and longest increasing contiguous subarray. The solution maps Uniform(0,1) to Uniform(-1,1), proves uniformity by independence, and gives O(n) one-pass subarray algorithms with index recovery and edge cases.

|Home/Coding & Algorithms/Google
Google logo
Google
Mar 9, 2025, 12:00 AM
mediumData ScientistTechnical ScreenCoding & Algorithms
8
0
Loading...

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...