![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Leetcode
文章平均质量分 68
anyien
这个作者很懒,什么都没留下…
展开
-
leetcode由易入难——【2】Balanced Binary Tree
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never d原创 2015-06-25 15:28:33 · 371 阅读 · 0 评论 -
leetcode由易入难——【1】Add Binary
Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100".原创 2015-06-25 14:24:49 · 335 阅读 · 0 评论 -
leetcode由易入难——【4】Decode Ways
A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26Given an encoded message containing digits, determine the total num原创 2015-06-26 09:43:16 · 680 阅读 · 0 评论 -
leetcode由易入难——【3】Climbing Stairs
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? 分析 设f(n)表示爬n阶楼梯的不同方法数原创 2015-06-26 09:36:24 · 307 阅读 · 0 评论 -
leetcode由易入难——【6】Count and Say
The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off as "原创 2015-06-29 20:10:01 · 461 阅读 · 0 评论 -
leetcode由易入难——【5】Compare Version Numbers
Compare two version numbers version1 and version2. If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0. You may assume that the version strings are non-empty and转载 2015-06-26 10:33:05 · 237 阅读 · 0 评论