Algorithm For Time Complexity Of Selection