Tesla interview question

Write algorithm for signal processing.