• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






tccbj

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 22 下一页

2019年2月28日

PAT A1103 Integer Factorization (30 分)——dfs,递归
摘要: The K−P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program t 阅读全文
posted @ 2019-02-28 14:38 tccbj 阅读(369) 评论(0) 推荐(0)
 
PAT A1102 Invert a Binary Tree (25 分)——静态树,层序遍历,先序遍历,后序遍历
摘要: 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 @ 2019-02-28 10:40 tccbj 阅读(110) 评论(0) 推荐(0)
 
PAT A1096 Consecutive Factors (20 分)——数字遍历
摘要: 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 @ 2019-02-28 10:00 tccbj 阅读(149) 评论(0) 推荐(0)
 

2019年2月27日

PAT A1098 Insertion or Heap Sort (25 分)——堆排序和插入排序,未完待续。。
摘要: According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insert 阅读全文
posted @ 2019-02-27 22:09 tccbj 阅读(130) 评论(0) 推荐(0)
 
PAT A1099 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 subtree of a node contains only nodes 阅读全文
posted @ 2019-02-27 22:06 tccbj 阅读(325) 评论(0) 推荐(0)
 
PAT A1097 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 values of the keys. That is, for each va 阅读全文
posted @ 2019-02-27 20:29 tccbj 阅读(295) 评论(0) 推荐(0)
 

2019年2月26日

PAT A1115 Counting Nodes in a BST (30 分)——二叉搜索树,层序遍历或者dfs
摘要: 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 @ 2019-02-26 20:17 tccbj 阅读(208) 评论(0) 推荐(0)
 
PAT A1113 Integer Set Partition (25 分)——排序题
摘要: Given a set of N (>1) positive integers, you are supposed to partition them into two disjoint sets A​1​​ and A​2​​ of n​1​​ and n​2​​ numbers, respect 阅读全文
posted @ 2019-02-26 16:27 tccbj 阅读(196) 评论(0) 推荐(0)
 
PAT A1112 Stucked Keyboard (20 分)——字符串
摘要: On a broken keyboard, some of the keys are always stucked. So when you type some sentences, the characters corresponding to those keys will appear rep 阅读全文
posted @ 2019-02-26 16:08 tccbj 阅读(256) 评论(0) 推荐(0)
 
PAT A1118 Birds in Forest (25 分)——并查集
摘要: Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You are 阅读全文
posted @ 2019-02-26 15:09 tccbj 阅读(383) 评论(0) 推荐(0)
 
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 22 下一页