2018年11月的全部文章
@kidultff

• 0
• 0
@kidultff

## PAT-A 真题 – 1123 Is It a Complete AVL Tree

An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is done to restore this propert ...
• 0
• 4
@kidultff

## PAT-A 真题 – 1122 Hamiltonian Cycle

The "Hamilton cycle problem" is to find a simple cycle that contains every vertex in a graph. Such a cycle is called a "Hamiltonian cycle".In this problem, you are supposed to tell if a given cycle is a Hamilt ...
• 0
• 0
@kidultff

## PAT-A 真题 – 1121 Damn Single

"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of.Input Specification:Each input file contains one ...
• 0
• 0
@kidultff

## PAT-A 真题 – 1120 Friend Numbers

Two integers are called "friend numbers" if they share the same sum of their digits, and the sum is their "friend ID". For example, 123 and 51 are friend numbers since 1+2+3 = 5+1 = 6, and 6 is their friend ID ...
• 0
• 0