Describe algorithm to find function maximum | Morgan Stanley Interview Question