摘要:
树这种数据结构容易出现极端情况,因为在建树的过程中,树的最终形态严重依赖于输入数据本身的性质,比如数据是否排序,是否随机分布等等。比如在输入数据是有序的情况下,构造的BST会退化成一个链表。(BST可以演变成为红黑树或者AVL树等来克服。) 但当我们仅需要连通与否的信息时,层层查找的效率就会很低,这 阅读全文
posted @ 2018-01-16 09:28
proscientist
阅读(249)
评论(0)
推荐(0)
摘要:
英文题意描述: James has a grid plate of size N×N. And non-negative integers are written on each grid unit of the plate. As James hates when there are too ma 阅读全文
posted @ 2018-01-16 09:03
proscientist
阅读(227)
评论(0)
推荐(0)
摘要:
非常经典的模拟题,首先需要建立120°坐标系,然后dfs 以下是AC的代码 阅读全文
posted @ 2018-01-16 08:47
proscientist
阅读(319)
评论(0)
推荐(0)

浙公网安备 33010602011771号