自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(19)
  • 资源 (1)
  • 收藏
  • 关注

原创 Power of Four

Given an integer (signed 32 bits), write a function to check whether it is a power of 4.Example:Given num = 16, return true.Given num = 5, return false.Follow up: Could you solve it without loop

2016-09-19 22:01:12 239

原创 Flatten Nested List Iterator

Given a nested list of integers, implement an iterator to flatten it.Each element is either an integer, or a list -- whose elements may also be integers or other lists.Example 1:Given the list [

2016-09-19 21:29:43 363

原创 Self Crossing

You are given an array x of n positive numbers. You start at point(0,0) and moves x[0] metres to the north, then x[1] metres to the west,x[2] metres to the south, x[3] metres to the east and so on

2016-09-18 17:03:37 421

原创 Increasing Triplet Subsequence

Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array.Formally the function should:Return true if there exists i, j, k such that arr[i] arr[j]

2016-09-18 11:38:43 195

原创 Design Twitter

Design a simplified version of Twitter where users can post tweets, follow/unfollow another user and is able to see the 10 most recent tweets in the user's news feed. Your design should support the fo

2016-09-17 21:59:38 232

原创 Reconstruct Itinerary

Given a list of airline tickets represented by pairs of departure and arrival airports[from, to], reconstruct the itinerary in order. All of the tickets belong to a man who departs fromJFK. Thus,

2016-09-13 18:45:21 416

原创 Verify Preorder Serialization of a Binary Tree

One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null node, we record using a sentinel value such as#.

2016-09-13 16:03:34 276

原创 Patching Array

Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range[1, n] inclusive can be formed by the sum of some elements in the array. Ret

2016-09-12 20:17:49 383

原创 Longest Increasing Path in a Matrix

Given an integer matrix, find the length of the longest increasing path.From each cell, you can either move to four directions: left, right, up or down. You may NOT move diagonally or move outside o

2016-09-11 16:02:28 252

原创 Wiggle Sort II

Given an unsorted array nums, reorder it such that nums[0] nums[2] .Example:(1) Given nums = [1, 5, 1, 1, 6, 4], one possible answer is [1, 4, 1, 5, 1, 6].(2) Given nums = [1, 3, 2, 2, 3, 1],

2016-09-09 18:48:26 247

原创 Maximum Product of Word Lengths

Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assume that each word will contain only lower case lett

2016-09-08 19:41:04 242

原创 Valid Perfect Square

Given a positive integer num, write a function which returns True if num is a perfect square else False.Note: Do not use any built-in library function such as sqrt.Example 1:Input: 16Return

2016-09-07 18:36:28 185

原创 Insert Delete GetRandom O(1) - Duplicates allowed

Design a data structure that supports all following operations in averageO(1) time.Note: Duplicate elements are allowed.insert(val): Inserts an item val to the collection.remove(val): Removes

2016-09-07 17:10:19 225

原创 Insert Delete GetRandom O(1)

Design a data structure that supports all following operations in averageO(1) time.insert(val): Inserts an item val to the set if not already present.remove(val): Removes an item val from the se

2016-09-07 15:37:50 264

原创 Decode String

Given an encoded string, return it's decoded string.The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactlyk times. Note that k is gu

2016-09-06 15:05:31 534

原创 Longest Substring with At Least K Repeating Characters

Find the length of the longest substring T of a given string (consists of lowercase letters only) such that every character inT appears no less than k times.Example 1:Input:s = "aaabb", k = 3

2016-09-06 13:20:37 1318

原创 Find K Pairs with Smallest Sums

You are given two integer arrays nums1 and nums2 sorted in ascending order and an integerk. Define a pair (u,v) which consists of one element from the first array and one element from the second a

2016-09-05 17:34:59 291

原创 Guess Number Higher or Lower

题目描述:We are playing the Guess Game. The game is as follows:I pick a number from 1 to n. You have to guess which number I picked.Every time you guess wrong, I'll tell you whether the number i

2016-09-02 17:28:19 215

原创 Combination Sum IV

Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target.Example:nums = [1, 2, 3]target = 4The possi

2016-09-02 15:33:59 227

反编译插件jad

我用的是myeclipse2015,成功了,很方便也很必要的插件。

2016-04-22

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除