2018年1月的全部文章
@kidultff

C语言-树的遍历

0x00、树的静态写法    之前刷PAT的过程中已经接触过树的静态写法了,不过之前接触过的都是二叉树,这里是树。使用数组当做内存,下标当做地址,即可存放静态树。比如这样:struct node{     Elemen ...
  • 0
  • 0
@kidultff

PAT-A 真题- 1102. Invert a Binary Tree

原题干: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 whiteboard so fuck off.Now it's your turn to prove that YOU CAN invert ...
  • 0
  • 0
@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