Try to solve taking a list having loop in the list otherwise it will give true whether it is even or odd no of nodes in the list.
Now It will return false when loop is detected because pointer B runs twice fast than pointer A. So after sometime pointer A will catch pointer B and B!=A become faulty and return false because there is B==null condition always faulty.Since there is loop in the list then B can't have null.