Last active
February 14, 2019 14:14
-
-
Save romyilano/30c91f5a3b5ba5997c93111f6202f133 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let head = ListNode(1) | |
head.next = ListNode(5) | |
head.next?.next = ListNode(42) | |
var runner = head | |
while let nextNode = runner.next { | |
runner = nextNode | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment