![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
ctrl23
Talk is cheap. Show me the code.
展开
-
【LeetCode】292. Nim Game
You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the原创 2016-12-01 22:44:31 · 262 阅读 · 0 评论 -
【LeetCode】344. Reverse String
344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". public class ResverseString { public static原创 2016-12-01 22:35:49 · 300 阅读 · 0 评论 -
【LeetCode】136. Single Number
Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using ext原创 2016-12-01 22:49:47 · 194 阅读 · 0 评论 -
【LeetCode】67. Add Binary
Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". public class AddBinary { /** * Math. String. * Initialize two poi原创 2016-12-01 23:00:10 · 262 阅读 · 0 评论 -
二叉搜索树的后序遍历序列
题目描述 输入一个整数数组,判断该数组是不是某二叉搜索树的后序遍历的结果。如果是则输出Yes,否则输出No。假设输入的数组的任意两个数字都互不相同。 思路:先来看一下二叉搜索树的定义。 二叉查找树(Binary Search Tree),(又:二叉搜索树,二叉排序树)它或者是一棵空树,或者是具有下列性质的二叉树: 若它的左子树不空,则左子树上所有结点的值均小于它的根结点的原创 2017-04-25 21:39:29 · 325 阅读 · 0 评论