Capital One interview question

Some random LC style question