Vishay Interview Question

How to make a square wave from a sinusoidal wave?