2018年1月的全部文章
@kidultff

PAT-A 真题- 1086. Tree Traversals Again

原题干: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 keys numbered from 1 to 6) is traversed, the stack operations are: pus ...
  • 0
  • 1
@kidultff

emlog修改连接方式使MySQL兼容emoji符号

emlog默认使用了UTF-8的方式连接MySQL,UTF-8最大字符大小为3字节,而emoji符号字符大小为4字节。所以造成emlog处理emoji符号的时候,提示类似这样的错误:SQL语句执行错误:"Incorrect string value: '\xF0\x9F\x98\x81'如果你的emlog没有修改过P ...
  • 0
  • 0
@kidultff

PAT-A 真题- 1020. Tree Traversals

原题干:Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the corresponding binary tre ...
  • 0
  • 0
@kidultff

C语言-二叉树的遍历

0x00、概述我们都学过数组的遍历,把数组所有元素都访问一遍,就称之为数组的遍历。同理,将二叉树的所有元素都访问一遍,也称之为二叉树的遍历。二叉树的遍历一般分为4种:先序、中序、后序、层次。前面三种可以使用DFS来实现,层次遍历可以使用B ...
  • 1
  • 1
@kidultff

二叉树(Binary Tree)的基本操作

0x00、树(Tree)树是一种和链表一样重要的数据结构,与链表不同的是,树有着层次结构。现实生活中的树,是由树根(root),树枝(edge),节点叶子(leaf)组成的。在数据结构中的树,就像是把数连根拔起,再四单脚朝天,也就是把现实生活中的树倒 ...
  • 0
  • 2