05 2023 档案

摘要:题目: This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtained from the given directed 阅读全文
posted @ 2023-05-31 16:42 Yohoc 阅读(7) 评论(0) 推荐(0) 编辑
摘要:题目: Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You 阅读全文
posted @ 2023-05-31 14:44 Yohoc 阅读(19) 评论(0) 推荐(0) 编辑
摘要:题目: When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. A s 阅读全文
posted @ 2023-05-31 11:08 Yohoc 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-05-29 21:36 Yohoc 阅读(6) 评论(0) 推荐(0) 编辑
摘要:题目: 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. Given any two nodes in a 阅读全文
posted @ 2023-05-28 09:58 Yohoc 阅读(9) 评论(0) 推荐(0) 编辑
摘要:题目: 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 阅读全文
posted @ 2023-05-25 09:12 Yohoc 阅读(5) 评论(0) 推荐(0) 编辑
摘要:题目: Given a tree, you are supposed to tell if it is a complete binary tree. Input Specification: Each input file contains one test case. For each case 阅读全文
posted @ 2023-05-24 10:24 Yohoc 阅读(42) 评论(0) 推荐(0) 编辑
摘要:题目: Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and 阅读全文
posted @ 2023-05-23 13:51 Yohoc 阅读(15) 评论(0) 推荐(0) 编辑
摘要:题目: A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only no 阅读全文
posted @ 2023-05-23 09:46 Yohoc 阅读(12) 评论(0) 推荐(0) 编辑
摘要:题目: A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only no 阅读全文
posted @ 2023-05-22 11:19 Yohoc 阅读(32) 评论(0) 推荐(0) 编辑
摘要:题目: A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only no 阅读全文
posted @ 2023-05-22 09:43 Yohoc 阅读(11) 评论(0) 推荐(0) 编辑
摘要:1. 以引用或指针形式传入: cpp void foo(std::vector<int> &vec); // 以引用形式传入 void bar(std::vector<int> *ptr); // 以指针形式传入 这种方式不会复制vec,函数内操作的是vec本身。可以改变vec。例如: cpp st 阅读全文
posted @ 2023-05-21 10:36 Yohoc 阅读(822) 评论(0) 推荐(0) 编辑
摘要:题目: Given a non-empty tree with root R, and with weight Wi​assigned to each tree node Ti​. The weight of a path from R to L is defined to be the sum o 阅读全文
posted @ 2023-05-21 10:35 Yohoc 阅读(27) 评论(0) 推荐(0) 编辑
摘要:题目: The following is from Max Howell @twitter: Google: 90% of our engineers use the software you wrote (Homebrew), but you can't invert a binary tree 阅读全文
posted @ 2023-05-20 11:46 Yohoc 阅读(11) 评论(0) 推荐(0) 编辑
摘要:题目: An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with 阅读全文
posted @ 2023-05-20 11:01 Yohoc 阅读(10) 评论(0) 推荐(0) 编辑
摘要:题目: A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to fi 阅读全文
posted @ 2023-05-20 09:34 Yohoc 阅读(10) 评论(0) 推荐(0) 编辑
摘要:二维都变长的二维容器数组 1、在C++中,可以这样初始化一个二维vector数组并指定大小: cpp vector<vector<int>> vec(3, vector<int>(4)); 这个代码会创建一个3行4列的二维vector数组,每个元素初始化为0:vec = [0 0 0 0][0 0 阅读全文
posted @ 2023-05-18 14:08 Yohoc 阅读(7826) 评论(1) 推荐(0) 编辑
摘要:题目: Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed t 阅读全文
posted @ 2023-05-16 09:48 Yohoc 阅读(15) 评论(0) 推荐(0) 编辑
摘要:One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions 阅读全文
posted @ 2023-05-15 22:22 Yohoc 阅读(15) 评论(0) 推荐(0) 编辑
摘要:题目: The K−P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a progr 阅读全文
posted @ 2023-05-14 13:52 Yohoc 阅读(11) 评论(0) 推荐(0) 编辑
摘要:题目: Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a soci 阅读全文
posted @ 2023-05-14 10:51 Yohoc 阅读(13) 评论(0) 推荐(0) 编辑
摘要:With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing ba 阅读全文
posted @ 2023-05-12 17:56 Yohoc 阅读(13) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示