function compareTables(t1, t2)
if type(t1) ~= 'table' or type(t2) ~= 'table' then
return t1 == t2
end
-- compare common elements, check for extra elements in t1
for k, v in pairs(t1) do
local v2 = t2[k]
if not compareTables(v, v2) then return false end
end
-- check for extra elements in t2
for k, v in pairs(t2) do
local v1 = t1[k]
if v1 == nil then return false end
end
-- all matched, tables are equal
return true
endtest run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Recognizer | Recognition Result | Visualize | Recalc |
|---|---|---|---|
| #308 | 488 | [visualize] |