跳至主要內容

序列化二叉树

微信公众号:储凡2023/11/13小于 1 分钟

序列化二叉树

题目链接

题目描述

刷题思路

代码实现

export function TreeNode(x) {
  this.val = x
  this.left = null
  this.right = null
}
export function Serialize(pRoot) {
  console.log(pRoot)
}

/**
 *
 * @param s
 * @constructor
 */
export function Deserialize(s) {
  console.log(s)
}

一些建议

更新日志

2024/7/29 15:43
查看所有更新日志
  • 5a2b2-feat: 移除markdown-cli模块,采用prettier校验文档格式
  • c0f2d-refactor: 升级vuepress相关版本,优化项目结构 (#137)
  • 6ff0a-feat(algo): 新增剑指、shell等算法文档