摘要:
变量 变量的类型 declare –a name :表示数组array。 declare –f name :表示是function的名字。 declare –F name :同上,但只显示function的名字。 declare –i name :表示整数 readonly name=value d 阅读全文
摘要:
static void Main(string[] args) { var d = KMP("abcabcadabc55abcabcadabc55", "abcabcadabc"); } static List KMP(string s, string p) { int[] pi = ComputePrefix(p); List result = new List... 阅读全文
摘要:
直接寻址列表 direct-address table 假设有动态集合,元素取自U={0,1,...,m-1}中一个关键字,不重复。 为了表示这个动态集合,可以使用一个直接寻址列表T[0..m-1]进行存储,列表中每一个位置叫做槽slot,slot k point to key k. if k is 阅读全文
摘要:
栈 栈是后进先出 class Stack { int[] items; public Stack(int i = 10) { Length = i; Top = -1; items = new int[10]; } //栈的最大大小 public int Length { get; set; } / 阅读全文