Drw Coding & Algorithms Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Compute rolling standard deviation in O(n)
Given an array of numbers and a window size k, compute the rolling standard deviation for every contiguous window. Design an O(n) algorithm that updat...
Implement portfolio optimization simulation
Question Given price-return time series in a DataFrame, simulate random portfolio weights, compute expected return, volatility, Sharpe ratio, and retu...
Solve movie ratings, array, release scheduler
Question LeetCode 135. Candy – Distribute the minimum number of candies (stars) so that each movie gets at least one star and any movie with a higher ...
Solve odd-string, digit swap, patient slot assignment
Question Task 1 – Odd-occurrence string: Write a function that, given an integer N (1..200 000), returns a length-N lowercase string in which every le...
Solve three algorithmic OA tasks
Task 1 (Odd-frequency string): Given an integer N in [1..200000], write an algorithm that returns any length-N string of lowercase letters (a–z) such ...
Solve three algorithmic tasks in Python
Implement in Python three tasks. 1) Movie Ratings (DP): Given an integer array ratings of length n, return both (a) the length of the longest strictly...