Proof of linear time