摘要:
struct Node* connect(struct Node* root) { if (root == NULL) { return root; } // 从根节点开始 struct Node* leftmost = root; while (leftmost->left != NULL) { 阅读全文
摘要:
#define min(a,b) ((a)<(b))?(a):(b) int minimumTotal(int** triangle, int triangleSize, int* triangleColSize){ for (int i=triangleSize-2; i>=0; i--) for 阅读全文
摘要:
void flatten(struct TreeNode* root) { struct TreeNode* curr = root; while (curr != NULL) { if (curr->left != NULL) { struct TreeNode* next = curr->lef 阅读全文