add solution for partition list problem of leet code