随笔分类 -  PAT

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页
摘要: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 @ 2020-01-26 19:30 SteveYu 阅读(147) 评论(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 on a 阅读全文
posted @ 2020-01-26 17:56 SteveYu 阅读(146) 评论(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 nodes 阅读全文
posted @ 2020-01-26 14:39 SteveYu 阅读(154) 评论(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 nodes 阅读全文
posted @ 2020-01-26 13:07 SteveYu 阅读(164) 评论(0) 推荐(0)
摘要:Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of b 阅读全文
posted @ 2020-01-25 15:47 SteveYu 阅读(155) 评论(0) 推荐(0)
摘要:Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3×5×6×7, where 5, 6, a 阅读全文
posted @ 2020-01-25 14:59 SteveYu 阅读(168) 评论(0) 推荐(0)
摘要:On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on sc 阅读全文
posted @ 2020-01-25 11:00 SteveYu 阅读(139) 评论(0) 推荐(0)
摘要:People often have a preference among synonyms of the same word. For example, some may prefer "the police", while others may prefer "the cops". Analyzi 阅读全文
posted @ 2020-01-25 10:28 SteveYu 阅读(163) 评论(0) 推荐(0)
摘要:There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then th 阅读全文
posted @ 2020-01-23 12:34 SteveYu 阅读(153) 评论(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 nodes 阅读全文
posted @ 2020-01-23 00:23 SteveYu 阅读(212) 评论(0) 推荐(0)
摘要:Given any string of N (≥) characters, you are asked to form the characters into the shape of U. For example, helloworld can be printed as: h d e l l r 阅读全文
posted @ 2020-01-22 13:05 SteveYu 阅读(167) 评论(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 the 阅读全文
posted @ 2020-01-21 12:04 SteveYu 阅读(200) 评论(0) 推荐(0)
摘要:Given two strings S​1​​ and S​2​​, S=S​1​​−S​2​​ is defined to be the remaining string after taking all the characters in S​2​​ from S​1​​. Your task 阅读全文
posted @ 2020-01-21 11:36 SteveYu 阅读(139) 评论(0) 推荐(0)
摘要:Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 2469135 阅读全文
posted @ 2020-01-21 02:38 SteveYu 阅读(269) 评论(0) 推荐(0)
摘要:Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given Is PAT&TAP symmetric?, the longest symme 阅读全文
posted @ 2020-01-21 00:56 SteveYu 阅读(135) 评论(0) 推荐(0)
摘要:1020 Tree Traversals (25分) Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequen 阅读全文
posted @ 2020-01-20 19:33 SteveYu 阅读(139) 评论(0) 推荐(0)
摘要:A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each inp 阅读全文
posted @ 2020-01-20 16:49 SteveYu 阅读(202) 评论(0) 推荐(0)
摘要:在我们业务开发中,常用到密码校验的特殊符号。那么,什么字符属于特殊符号呢? 以下列出特殊符号集合 ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ 阅读全文
posted @ 2020-01-20 13:11 SteveYu 阅读(1688) 评论(0) 推荐(0)
摘要:In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture below) for recruitment. The content is supe 阅读全文
posted @ 2020-01-20 01:37 SteveYu 阅读(258) 评论(0) 推荐(0)
摘要:The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed 阅读全文
posted @ 2020-01-20 00:58 SteveYu 阅读(200) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页