Nicodemus went to Jesus in the middle of the night. He was impressed of the miracles Jesus could perform. Jesus told him the only way one could get to heaven was by being born again.
Nicodemus Leaves Jesus
Nicodemus was very confused of how one could be born again. He knew that it didn't mean for him to come out his mother again.
Similarity Between Nicodemus and Samaritan Woman
Jesus explained to Nicodemus that one could not be reborn by flesh. If one wanted to be born again, it had to be by spirit, which was by believing in Jesus.
Difference Between Nicodemus and Samaritan Woman
Jesus told Nicodemus that God sent His only son to bless and save the world, not to curse it. Nicodemus left Jesus and didn't preach what Jesus had told him.
A similarity between the story of Nicodemus and the story of the Samaritan Woman is that both of them believed what Jesus had told them.
A difference between Nicodemus and the Samaritan Woman is that Nicodemus didn't tell anyone about his meeting with Jesus but, on the other hand, the Samaritan Woman told everybody about her encounter.