
图/堆/树
hqw11
这个作者很懒,什么都没留下…
展开
-
网易互娱2017实习生招聘在线笔试第一场-2源代码编译
http://hihocoder.com/contest/ntest2016spring1/problem/2 拓扑排序 处理一下字符串 没什么好说的。。 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 在网易游戏的日常工作中,C++ 是一门常用的语言。面对众多的 C++ 代码,等待源文件编译的漫长时间是个令人糟心的时刻,一直以来大家对此怨原创 2016-03-21 00:45:46 · 1184 阅读 · 0 评论 -
recover-binary-search-tree && validate-binary-search-tree
题目: Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note: A solution using O(n ) space is pretty straight forward. Could you devise...原创 2019-04-11 15:47:02 · 141 阅读 · 0 评论 -
二叉树所有路径的值的和
一道很简单的题目,这里只是对比一下几种思路和做法。 题目很简单,就是一颗二叉树由0-9数字构成,求所有root->leaf路径组成的数的总和。 Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number. An example is the root-t...原创 2019-04-07 23:48:20 · 1501 阅读 · 0 评论