上一页 1 2 3 4 5 6 7 8 ··· 25 下一页
摘要: 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 grap 阅读全文
posted @ 2018-07-12 21:46 赖兴宇 阅读(179) 评论(0) 推荐(0) 编辑
摘要: In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the 阅读全文
posted @ 2018-07-12 21:45 赖兴宇 阅读(327) 评论(0) 推荐(0) 编辑
摘要: 包括以下内容: 变量解释:int[] arr1; 记录查找表,所有元素都是唯一的 int[] arr2; 记录查找表,元素不唯一 测试用例: 一. 查找key在数组中的位置, 查找不成功则返回-1; 迭代实现: 递归实现: 这里对递归实现,做一定的解释: 首先这个函数的功能是在查找表arr1[]中查 阅读全文
posted @ 2018-07-04 21:41 赖兴宇 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 struct node{ 7 int val; 8 node *left, *right; 9 bool vis; 10 int tag; 11 }; 12 13 void inse... 阅读全文
posted @ 2018-07-04 19:14 赖兴宇 阅读(286) 评论(0) 推荐(0) 编辑
摘要: In graph theory, an Eulerian path is a path in a graph which visits every edge exactly once. Similarly, an Eulerian circuit is an Eulerian path which 阅读全文
posted @ 2018-06-28 20:27 赖兴宇 阅读(1152) 评论(0) 推荐(0) 编辑
摘要: Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is t 阅读全文
posted @ 2018-06-28 19:46 赖兴宇 阅读(273) 评论(0) 推荐(0) 编辑
摘要: A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as po 阅读全文
posted @ 2018-06-28 17:57 赖兴宇 阅读(190) 评论(0) 推荐(0) 编辑
摘要: It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that c 阅读全文
posted @ 2018-06-28 15:24 赖兴宇 阅读(133) 评论(0) 推荐(0) 编辑
摘要: As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some ro 阅读全文
posted @ 2018-06-28 10:56 赖兴宇 阅读(301) 评论(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 social n 阅读全文
posted @ 2018-06-28 01:34 赖兴宇 阅读(122) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 25 下一页