摘要:
Exclusive Time of Functions 函数占用时间 在单核单线程CPU上执行任务,任务id 从0到n-1,任务会交替间断执行, Input: n = 2, logs = ["0:start:0","1:start:2","1:end:5","0:end:6"] Output: [3 阅读全文
posted @ 2021-04-16 13:38
WilliamCui
阅读(79)
评论(0)
推荐(0)
摘要:
Basic Calculator II 基本计算器 给定一个字符串格式的算式,计算该式的值。只包含+-*/ Input: s = "3+2*2" Output: 7 Input: s = " 3+5 / 2 " Output: 5 思路 使用2个栈,nums存放数字,op存放符号; public i 阅读全文
posted @ 2021-04-16 11:36
WilliamCui
阅读(89)
评论(0)
推荐(0)
摘要:
Verify Preorder Serialization of a Binary Tree 验证二叉树前序序列化 前序遍历是啥就不说了,百度一下, 简单说就是root-> left_child->right_child.被前序序列化的二叉树就是一个按照前序遍历的顺序,空节点用#来标识。 该二叉树可 阅读全文
posted @ 2021-04-16 11:21
WilliamCui
阅读(73)
评论(0)
推荐(0)
摘要:
Binary Tree Postorder Traversal 二叉树后序遍历 后序遍历是啥就不说了,百度一下, 简单说就是 left_child->right_child->root. Input: root = [1,null,2,3] Output: [3,2,1] 思路 递归处理 /** * 阅读全文
posted @ 2021-04-16 11:19
WilliamCui
阅读(76)
评论(0)
推荐(0)


浙公网安备 33010602011771号