摘要: 1016. Phone Bills (25)A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amoun... 阅读全文
posted @ 2015-08-18 22:04 JackWang822 阅读(596) 评论(1) 推荐(0) 编辑
摘要: 1099. Build A Binary Search Tree (30)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left su... 阅读全文
posted @ 2015-08-18 14:03 JackWang822 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 1097. Deduplication on a Linked List (25)Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute... 阅读全文
posted @ 2015-08-18 13:34 JackWang822 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 1096. Consecutive Factors (20)Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be fact... 阅读全文
posted @ 2015-08-18 12:57 JackWang822 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 1090. Highest Price in Supply Chain (25)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in mo... 阅读全文
posted @ 2015-08-17 20:53 JackWang822 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 1088. Rational Arithmetic (20)For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, ... 阅读全文
posted @ 2015-08-17 20:22 JackWang822 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1086. Tree Traversals Again (25)An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that whe... 阅读全文
posted @ 2015-08-17 19:09 JackWang822 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1085. Perfect Sequence (25)Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence" if M ... 阅读全文
posted @ 2015-08-17 16:50 JackWang822 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 1083. List Grades (25)Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non... 阅读全文
posted @ 2015-08-16 21:29 JackWang822 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 1082. Read Number in Chinese (25)Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output "Fu" ... 阅读全文
posted @ 2015-08-15 23:00 JackWang822 阅读(207) 评论(0) 推荐(0) 编辑