fix 10: for accepting empty list and list has only one element
solution of problem 10
finished problem 11