A class that acts an implementation of a tree node in Swift
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
}
}