classic interview coding challenge