
LeetCode
Gizing
这个作者很懒,什么都没留下…
展开
-
67 Add Binary
Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".public static String addBinary(String a, String b) { int i = a.length() - 1原创 2016-09-13 19:01:57 · 206 阅读 · 0 评论 -
70.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?菲波那切数列public int climbSt原创 2016-09-13 19:10:25 · 215 阅读 · 0 评论 -
83.Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2->3.遍历一遍即可,重复则删除public Li原创 2016-09-13 19:22:09 · 188 阅读 · 0 评论 -
100.Same Tree
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.递归匹配pu原创 2016-09-13 20:35:11 · 320 阅读 · 0 评论