原创 PAT甲級1002 A+B for Polynomials (25 分)

題目: 1002 A+B for Polynomials (25 分) This time, you are supposed to find A+B where A and B are two polynomials. Inpu

原创 PAT甲級1001 A+B Format (20 分)

1001 A+B Format (20 分) Calculate a+b and output the sum in standard format – that is, the digits must be separated in

原创 實現完全二叉搜索樹(Complete Binary Search Tree)

題意:輸入元素個數、各元素的值,實現完全二叉搜索樹。 輸入:5 1 2 3 4 5 輸出:4 2 5 1 3 核心算法:此算法以數組爲容器,將所有元素放入A數組後,先將A數組中的所有元素排序,再將樹分爲左右兩部分(怎麼分會在算