摘要: 输入一个整数数组,判断该数组是不是某二叉搜索树的后序遍历的结果。如果是则输出Yes,否则输出No。假设输入的数组的任意两个数字都互不相同。 阅读全文
posted @ 2019-04-21 11:31 yjxyy 阅读(267) 评论(0) 推荐(0) 编辑
摘要: J.U.C 其他组件 FutureTask   介绍 Callable 时我们知道它可以有返回值, 返回值通过Future进行封装 。FutrueTask实现了RunnableFuture接口,该接口继承了Runnable和Future接口,这使得 FutureTask既可以当做 阅读全文
posted @ 2019-04-18 11:24 yjxyy 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. 阅读全文
posted @ 2019-04-18 10:16 yjxyy 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 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. 阅读全文
posted @ 2019-04-18 10:13 yjxyy 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the **longest substring** without repeating characters. 阅读全文
posted @ 2019-04-18 10:07 yjxyy 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 给定一个二叉树,从根节点开始一层一层打印二叉树,每一层从左到右。 阅读全文
posted @ 2019-04-17 22:01 yjxyy 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 输入两个整数序列,第一个序列表示栈的压入顺序,请判断第二个序列是否可能为该栈的弹出顺序。假设压入栈的所有数字均不相等。例如序列1,2,3,4,5是某栈的压入顺序,序列4,5,3,2,1是该压栈序列对应的一个弹出序列,但4,3,5,1,2就不可能是该压栈序列的弹出序列。 阅读全文
posted @ 2019-04-17 21:58 yjxyy 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 定义栈的数据结构,请在该类型中实现一个能够得到栈中所含最小元素的min函数(时间复杂度应为O(1))。 阅读全文
posted @ 2019-04-17 21:54 yjxyy 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字,例如,如果输入如下4 X 4矩阵: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 则依次打印出数字1,2,3,4,8,12,16,15,14,13,9,5,6,7,11,10. 阅读全文
posted @ 2019-04-16 22:24 yjxyy 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 操作给定的二叉树,将其变换为源二叉树的镜像。 阅读全文
posted @ 2019-04-16 22:22 yjxyy 阅读(105) 评论(0) 推荐(0) 编辑