随笔分类 -  PAT甲级

摘要:There is a kind of balanced binary search tree named red-black tree in the data structure. It has the following 5 properties: (1) Every node is either 阅读全文
posted @ 2019-11-23 21:13 滚烫的青春 阅读(765) 评论(0) 推荐(0)
摘要:The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants. A binary search tree (BST) i 阅读全文
posted @ 2019-11-15 17:11 滚烫的青春 阅读(193) 评论(0) 推荐(0)
摘要:1151 LCA in a Binary Tree (30 分) The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descenda 阅读全文
posted @ 2019-11-15 00:08 滚烫的青春 阅读(333) 评论(0) 推荐(0)
摘要:According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insert 阅读全文
posted @ 2019-11-08 20:25 滚烫的青春 阅读(182) 评论(0) 推荐(0)