Added lua scripts and fixed a typo in state machine code

This commit is contained in:
Nick Cano
2016-06-06 22:36:51 -07:00
parent 50152ef2c9
commit aceb397307
6 changed files with 131 additions and 1 deletions
@@ -0,0 +1,9 @@
function countLinkedListNodes(nodeAddress)
local counter = 0
local next = readInteger(nodeAddress)
while (next ~= nodeAddress) do
counter = counter + 1
next = readInteger(next)
end
return counter
end