Rippling Interview Question

You are given a continuous stream of integers as input. Design an algorithm to process each integer and maintain the last k integers in memory. At any given point, your task is to find and output the smallest difference pair among the last k integers.

Interview Answer

Anonymous

Dec 10, 2023

applied standard techniques using sets

3