摘要:
1 堆 堆是一个二叉堆的数组,可以被看成一个近似的完全二叉树。 有最大堆和最小堆的性质。最大堆就是某个节点的值至多于其父节点一样大。最小堆中最小的元素都存放在根节点中。 下面放上最小堆的伪代码: MIN-HEAPIFY(A, i) l = LEFT(i) r = RIGHT(i) if l <= A 阅读全文
摘要:
在html中,有许多的模板标签: 1 {% for i in student %} 比较符合python对象的语法。 后端返回的数据如下: def get_tem(request,pk): t = get_template('student/test.html') html = t.render() 阅读全文