Charles Schwab Interview Question

gave a problem and asked to draw the flow.