摘要:
For a student taking the online course "Data Structures" on China University MOOC (http://www.icourse163.org/), to be qualified for a certificate, he/ 阅读全文
摘要:
Consider a positive integer N written in standard notation with k+1 digits ai as ak⋯a1a0 with 0≤ai<10 for all i and ak>0. Then N is 阅读全文
摘要:
A vertex cover of a graph is a set of vertices such that each edge of the graph is incident to at least one vertex of the set. Now given a graph with 阅读全文
摘要:
Given a singly linked list, you are supposed to rearrange its elements so that all the negative values appear before all of the non-negatives, and all 阅读全文
摘要:
Cutting an integer means to cut a K digits lone integer Z into two integers of (K/2) digits long integers A and B. For example, after cutting Z = 1673 阅读全文
摘要:
Given a syntax tree (binary), you are supposed to output the corresponding infix expression, with parentheses reflecting the precedences of the operat 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文