博客专栏  >  编程语言   >  leetcode

leetcode

只要心向阳光,不管多晚都是好的。 希望通过leetcode,增强自己实际动手的能力,加油。

关注
0 已关注
9篇博文
  • leetcode138: Copy List with Random Pointer

    A linked list is given such that each node contains an additional random pointer which could point t...

    2016-05-12 21:56
    468
  • leetcode141: Linked List Cycle

    Given a linked list, determine if it has a cycle in it.Follow up: Can you solve it without using ex...

    2016-05-17 10:30
    1055
  • leetcode287: Find the Duplicate Number

    数组中有n+1个数,范围为1~n,请证明至少存在一个重复的数字。假设只有一个重复的数,请找出这个数。 假设n=4,那么数组中应该有5个数,每个数的范围为1~4且只有一个重复的数字。数组在放完1 2 ...

    2016-05-11 11:39
    231
  • leetcode19:Remove Nth Node From End of List

    实现查找不难,两次遍历链表,第一遍记录链表长度,第二次直接遍历到倒数第k个即可。难点在于如何设计高效的算法一次遍历链表实现查找。成功则返回该节点data域的值,返回1;否则返回0。能否这样想,倒数第k...

    2016-03-03 15:15
    340
  • google2016面试题-count of smaller numbers after self

    这是google2016的面试题,给定一个数组array[],返回一个计数数组count,count[i]表示array[]中第i个元素右边有多少个小于array[i](i>=0) 示例: 输入:...

    2016-03-21 21:46
    551
  • leetcode20-valid parenthese

    题目:Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the i...

    2016-04-25 20:41
    228
  • leetcode136-137:single number

    LC136和LC137这两个题很像,前者是一整数数组中,仅有一个元素出现一次,其余均出现两次,后者是仅有一个元素出现一次,其余均出现三次,都要求找到仅出现一次的那个元素。而且要求都在线性时间O(n)以...

    2016-04-28 11:18
    387
  • leetcode260-single number iii

    题目: Given an array of numbers nums, in which exactly two elements appear only once and all the oth...

    2016-04-29 20:07
    262
  • leetcode151: symmetric tree

    Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). 判断一颗二...

    2016-04-30 21:03
    254

img博客搬家
img撰写博客
img专家申请
img意见反馈
img返回顶部