Qualcomm Interview Question

How does a flip flop work?