Month: December 2018
[Leetcode] Random Pick Index
Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target...
[Leetcode] Moving Average from Data Stream
Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window. Example: MovingAverage m =...