p->next != NULL need condition p != NULL
p->next != NULL need condition p != NULL

python27/AlgorithmSolution,python27/AlgorithmSolution,python27/AlgorithmSolution,python27/AlgorithmSolution,python27/AlgorithmSolution