上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页

1084 Broken Keyboard (20 分)字符串

摘要: 1084 Broken Keyboard (20 分) On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to thos 阅读全文
posted @ 2019-01-24 15:00 ZhangのBlog 阅读(134) 评论(0) 推荐(0) 编辑

1086 Tree Traversals Again

摘要: 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 w 阅读全文
posted @ 2019-01-24 13:50 ZhangのBlog 阅读(145) 评论(0) 推荐(0) 编辑

1053 Path of Equal Weight (30 分)树的遍历,vector数组排序,优先级队列

摘要: pat甲级,树的邻接表存储,dfs,优先级队列 阅读全文
posted @ 2019-01-23 16:24 ZhangのBlog 阅读(204) 评论(0) 推荐(0) 编辑

1115 Counting Nodes in a BST (30 分)建立二叉搜索树,求每层结点数目

摘要: pat甲级,二叉搜索树的建立,dfs求每层结点树 阅读全文
posted @ 2019-01-23 14:32 ZhangのBlog 阅读(152) 评论(0) 推荐(0) 编辑

1051 Pop Sequence (25 分)简单模拟

摘要: pat甲级,出栈顺序是否合理,通过简单模拟方法进行判断。 阅读全文
posted @ 2019-01-23 13:55 ZhangのBlog 阅读(106) 评论(0) 推荐(0) 编辑

1064 Complete Binary Search Tree (30 分)完全二叉树

摘要: 1064 Complete Binary Search Tree (30 分) A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The lef 阅读全文
posted @ 2019-01-23 13:03 ZhangのBlog 阅读(178) 评论(0) 推荐(0) 编辑

1083 List Grades (25 分)排序

摘要: 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 n 阅读全文
posted @ 2019-01-23 12:30 ZhangのBlog 阅读(322) 评论(0) 推荐(0) 编辑

1054 The Dominant Color (20 分)map的使用

摘要: 1054 The Dominant Color (20 分) Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each 阅读全文
posted @ 2019-01-22 22:16 ZhangのBlog 阅读(124) 评论(0) 推荐(0) 编辑

1102 Invert a Binary Tree (25 分)dfs+层序+中序+后序遍历

摘要: 1102 Invert a Binary Tree (25 分) The following is from Max Howell @twitter: Google: 90% of our engineers use the software you wrote (Homebrew), but yo 阅读全文
posted @ 2019-01-22 21:56 ZhangのBlog 阅读(146) 评论(0) 推荐(0) 编辑

1094 The Largest Generation (25 分)dfs或bfs求图的最大宽度

摘要: 1094 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 same 阅读全文
posted @ 2019-01-22 18:03 ZhangのBlog 阅读(299) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页