Qualcomm interview question

How does a flip flop work?