摘要:
输入一个整数数组,判断该数组是不是某二叉搜索树的后序遍历的结果。如果是则输出Yes,否则输出No。假设输入的数组的任意两个数字都互不相同。 阅读全文
摘要:
J.U.C 其他组件 FutureTask 介绍 Callable 时我们知道它可以有返回值, 返回值通过Future进行封装 。FutrueTask实现了RunnableFuture接口,该接口继承了Runnable和Future接口,这使得 FutureTask既可以当做 阅读全文
摘要:
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. 阅读全文
摘要:
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. 阅读全文
摘要:
Given a string, find the length of the **longest substring** without repeating characters. 阅读全文
摘要:
给定一个二叉树,从根节点开始一层一层打印二叉树,每一层从左到右。 阅读全文
摘要:
输入两个整数序列,第一个序列表示栈的压入顺序,请判断第二个序列是否可能为该栈的弹出顺序。假设压入栈的所有数字均不相等。例如序列1,2,3,4,5是某栈的压入顺序,序列4,5,3,2,1是该压栈序列对应的一个弹出序列,但4,3,5,1,2就不可能是该压栈序列的弹出序列。 阅读全文
摘要:
定义栈的数据结构,请在该类型中实现一个能够得到栈中所含最小元素的min函数(时间复杂度应为O(1))。 阅读全文