- 博客(13)
- 资源 (11)
- 问答 (1)
- 收藏
- 关注
原创 leetcode-2. Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link
2016-08-18 21:19:26 468
原创 leetcode-1. Two Sum
前言:刷了几天简单的题找感觉,现在决定按照序号来做题。 Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solu
2016-08-18 20:35:36 188
原创 leetcode-350. Intersection of Two Arrays II
Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. Note: Each element in the result should appear as ma
2016-08-12 01:14:09 197
原创 leetcode-217. Contains Duplicate
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element
2016-08-11 23:39:53 184
原创 leetcode-171. Excel Sheet Column Number
Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 public cla
2016-08-11 21:36:11 313
原创 leetcode-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. /**
2016-08-11 21:21:11 187
原创 leetcode-349. Intersection of Two Arrays
Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note: Each element in the result must be unique. T
2016-08-11 21:05:06 269
原创 leetcode-104. Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. /** * Definition for a binary tre
2016-08-11 20:42:03 263
原创 leetcode-258. Add Digits
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has on
2016-08-11 17:06:22 199
原创 leetcode-383. Ransom Note
Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constru
2016-08-11 15:21:36 689
原创 leetcode-371. Sum of Two Integers
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example: Given a = 1 and b = 2, return 3. public class Solution { public int getSum(int a, in
2016-08-10 22:35:47 226
原创 leetcode-292. Nim Game
You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the
2016-08-10 21:32:54 223
原创 leetcode-344. Reverse String
重新刷题,由于计划是先刷一遍,从自己最熟悉的java开始刷题,刷完之后考虑尝试用其他语言刷题。 —————————————————————————————————————————————————————————— Write a function that takes a string as input and returns the string reversed. Examp
2016-08-10 21:10:32 221
hadoop2.6.0+spark1.0所需资源
2015-02-04
本机修改hosts无效求助
2014-10-09
TA创建的收藏夹 TA关注的收藏夹
TA关注的人