摘要: 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-19 23:12 自由之翼Az 阅读(130) 评论(0) 推荐(0) 编辑
摘要: A clique is a subset of vertices of an undirected graph such that every two distinct vertices in the clique are adjacent. A maximal clique is a clique 阅读全文
posted @ 2019-11-19 22:44 自由之翼Az 阅读(143) 评论(0) 推荐(0) 编辑
摘要: After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the rank 阅读全文
posted @ 2019-11-19 22:38 自由之翼Az 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Look-and-say sequence is a sequence of integers as the following: D, D1, D111, D113, D11231, D112213111, ... where D is in [0, 9] except 1. The (n+1)s 阅读全文
posted @ 2019-11-19 22:33 自由之翼Az 阅读(123) 评论(0) 推荐(0) 编辑