摘要:本文首发于我的博客 算法分析 运行时间的计算分析 上界:\(O(f(N))\) 下界:\(Ω(g(N))\) 准确表达则为:\(Θ(h(N))\) 也就是说都是一个关于N的函数! 这么做的目的是为了比较两个算法的相对增长速率 求解算法时间复杂度的步骤 找出算法中的基本语句; 算法中执行次数最多的那条 阅读全文
posted @ 2019-11-28 16:45 tanknee 阅读(697) 评论(0) 推荐(0) 编辑
摘要:题目 Deduplication on a Linked List (25) 题目描述 Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absol 阅读全文
posted @ 2021-01-27 18:50 tanknee 阅读(0) 评论(0) 推荐(0) 编辑
摘要:题目 Consecutive Factors (20) 题目描述 Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be f 阅读全文
posted @ 2021-01-27 18:49 tanknee 阅读(0) 评论(0) 推荐(0) 编辑
摘要:题目 Cars on Campus (30) 题目描述 Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate number 阅读全文
posted @ 2021-01-27 18:48 tanknee 阅读(0) 评论(0) 推荐(0) 编辑
摘要:题目 The Largest Generation (25) 题目描述 A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the sam 阅读全文
posted @ 2021-01-27 18:47 tanknee 阅读(0) 评论(0) 推荐(0) 编辑
摘要:题目 1003 Highest Price in Supply Chain (25) 题目描述 A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involv 阅读全文
posted @ 2021-01-27 18:46 tanknee 阅读(0) 评论(0) 推荐(0) 编辑
摘要:题目 1001 Public Bike Management (30) 题目描述 There is a public bike service in Hangzhou City which provides great convenience to the tourists from all ove 阅读全文
posted @ 2021-01-27 18:44 tanknee 阅读(2) 评论(0) 推荐(0) 编辑
摘要:题目 1013 Battle Over Cities (25分) It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, al 阅读全文
posted @ 2021-01-25 15:24 tanknee 阅读(5) 评论(0) 推荐(0) 编辑
摘要:题目 1012 The Best Rank (25分) To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C P 阅读全文
posted @ 2021-01-25 15:23 tanknee 阅读(12) 评论(0) 推荐(0) 编辑
摘要:题目 1011 World Cup Betting (20分) With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best play 阅读全文
posted @ 2021-01-25 15:22 tanknee 阅读(7) 评论(0) 推荐(0) 编辑
摘要:题目 1010 Radix (25分) Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal 阅读全文
posted @ 2021-01-24 16:54 tanknee 阅读(6) 评论(0) 推荐(0) 编辑