摘要:
题目:Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or eq... 阅读全文
摘要:
题目:Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.说明: 1)实现与... 阅读全文
摘要:
题目:Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.说明: 1)二叉树可... 阅读全文
摘要:
auto定义变量时放在变量前,无需知道具体变量类型,系统可自行推断类型,减少编程工作,特别是在模板使用时,使用更方便。下面简单例子:1 auto a=1;2 auto b='a';3 auto s="abdc";4 auto c;//这样使用时错误的,系统无法自动推断出变量类型5 //下... 阅读全文