Add code for sorted lists problem.