Update Traversals.java

Changed variable names in method 3