
leetcode
apple
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Leetcode习题: SingleNumber II
Single Number II AC Rate: 323/1255 My Submissions Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have原创 2013-10-04 11:35:40 · 2820 阅读 · 0 评论 -
Leetcode习题:Divide Two Integers
Divide Two Integers AC Rate: 770/5289 My Submissions Divide two integers without using multiplication, division and mod operator. 提交了几次,看似简单的一道题,第一下提交发现忘考虑负数的情况……以后做题一定要想清楚。第二次提原创 2013-10-08 23:45:14 · 2476 阅读 · 0 评论 -
Leetcode习题:Remove Nth Node From End of List
Remove Nth Node From End of List AC Rate: 1023/3385 My Submissions Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked lis原创 2013-10-09 00:12:05 · 3083 阅读 · 0 评论 -
Leetcode习题:Convert Sorted List to Binary Search Tree
Convert Sorted List to Binary Search Tree AC Rate: 878/3476 My Submissions Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.原创 2013-10-10 22:13:34 · 2290 阅读 · 0 评论 -
Leetcode习题:Unique Binary Search Trees
Unique Binary Search Trees AC Rate: 1802/5241 My Submissions Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n = 3, ther原创 2013-10-23 23:14:43 · 876 阅读 · 0 评论 -
Leetcode习题-Reverse Integer
Reverse Integer AC Rate: 2538/6177 My Submissions Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 click to show spoilers. Have you thoug原创 2013-10-23 22:45:34 · 1103 阅读 · 0 评论 -
Leetcode 习题: Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. /** * Definition for singly-linked list. * public class ListNode { * int val;原创 2014-05-23 08:16:51 · 703 阅读 · 0 评论 -
Leetcode习题:Pow(x, n)
public class Solution { public double pow(double x, int n) { if(x == 0 || x == 1.0 || n == 1){ return x; }else if(n == 0){ return 1; }原创 2014-05-25 22:27:36 · 785 阅读 · 0 评论