
leetcode
文章平均质量分 59
pangzhe_sd
这个作者很懒,什么都没留下…
展开
-
Number of Digit One 【leetcode】
Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.For example:Given n = 13,Return 6, because digit 1 occurred in the follow原创 2015-07-09 10:31:36 · 562 阅读 · 0 评论 -
【leetcode】二叉树的LCA问题:Lowest Common Ancestor of a Binary Tree
还是递归问题,定义left和right递归调用原函数,直到叶子结点为止。判断两个输入参数的父节点,有三种情况:第一,分别为左右树,父节点为root (第一个if条件)第二,遍历到P和Q时,将其返回给left和right,(第二个if条件)第三,根据left和right的值进行判断,父节点是左边还是右边并返回对应值(第三个if条件)。/** * Definition for原创 2015-07-14 19:47:51 · 911 阅读 · 0 评论 -
第一个自己完成的leetcode( JAVA) Implement Queue using Stacks
Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in front of queue. peek() -- Get the front element. em原创 2015-07-08 09:51:38 · 386 阅读 · 0 评论 -
Merge Sorted Array 【leetcode】
Given two sorted integer arrays nums1 and nums2, merge nums2 intonums1 as one sorted array.Note:You may assume that nums1 has enough space (size that is greater or equal tom + n) to hold a原创 2015-07-09 09:47:59 · 321 阅读 · 0 评论 -
BAT内推之阿里内推介绍
http://www.onbupt.com/message/index.html内部人员介绍阿大原创 2015-07-20 15:18:41 · 1354 阅读 · 0 评论