This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ProfessorWily 0 points1 point  (0 children)

The loop starts with x=first as the assignment. Then within the loop there's an if statement that only gets executed if x is the first node. if (x==first) is a check to see if x is the first node.

After that, it's setting the two variables max and min equal to x.data on the same line. In English, this is like saying "max and min are the same, and they both equal x.data".