leetcode2sumc acm:数据结构与算法
leetcode 2 sum c 1. ACM Basic 1.8.2. list子串 1.1. Reference 1.2. List 1.2.1. 数组存储线性表 struct LNode{ int Data[MAXSIZE]; int Last; }
建立空表MakeEmpty 查找元素Find 插入元素Insert 删除元素Delete 1.2.2. 链式存储线性表 1.2.2.1. 链表数据结构(c) typedef struct LNode *PtrToLNode; struct LNode { int Data; PtrToLNode Next; }
1.2.2.2. 节点(python) class ListNode(object): def __init__(self, x): self.val = x self.next = None
1.2.2.3. 从数组中创建单向链表(lc83) def create_linklist(list_elems): node = ListNode(0) node_ret = node for i in list_ele