摘要:
# 链表节点 local Node = {} Node.__cname = "util.LinkedList.Node" Node.__index = Node function Node.new(list, value) local obj = {} setmetatable(obj, Node) 阅读全文
posted @ 2021-11-12 00:35
yanghui01
阅读(47)
评论(0)
推荐(0)
摘要:
# 使用循环队列的方式 local arrayext = require("arrayext") local Queue = {} Queue.__cname = "util.Queue" Queue.__index = Queue local ClearTypeEnum = { Reset = n 阅读全文
posted @ 2021-11-12 00:29
yanghui01
阅读(54)
评论(0)
推荐(0)
摘要:
local Stack = {} Stack.__cname = "util.Stack" Stack.__index = Stack function Stack.new2(src) assert("util.Stack" == src.__cname, "InvalidArgument: not 阅读全文
posted @ 2021-11-12 00:28
yanghui01
阅读(42)
评论(0)
推荐(0)
摘要:
# 在table的基础山增加了更直观的列表操作函数,同时使用了_count来跟踪元素数量 local list = {} list.__cname = "util.list" local null = {} list.null = null list.__newindex = function(se 阅读全文
posted @ 2021-11-12 00:26
yanghui01
阅读(71)
评论(0)
推荐(0)

浙公网安备 33010602011771号