Created
July 16, 2015 02:10
-
-
Save jweinst1/2b378923630134748ae4 to your computer and use it in GitHub Desktop.
A class that acts an implementation of a tree node in Swift
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
class Nodes { | |
init(data:Int, next_node:Int) { | |
var data = data | |
var next_node = next_node | |
} | |
func GetData() ->Int { | |
return Nodes.data | |
} | |
func GetNext() ->Int { | |
return Nodes.next_node | |
} | |
func SetNext(new_next:Int) { | |
Nodes.next_node = new_next | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment