- 博客(9)
- 资源 (3)
- 收藏
- 关注
原创 【Leetcode】Longest Absolute File Path
题目链接:https://leetcode.com/problems/longest-absolute-file-path/题目:Suppose we abstract our file system by a string in the following manner:The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext
2016-08-30 14:47:26 2861
原创 【Leetcode】Mini Parser
题目链接:https://leetcode.com/problems/mini-parser/题目:Given a nested list of integers represented as a string, implement a parser to deserialize it.Each element is either an integer, or a list -
2016-08-15 09:52:03 3518
原创 【Leetcode】Shuffle an Array
题目链接:https://leetcode.com/problems/shuffle-an-array/题目:Shuffle a set of numbers without duplicates.Example:// Init an array with set 1, 2, and 3.int[] nums = {1,2,3};Solution solution
2016-08-12 21:39:35 3180
原创 【Leetcode】Ransom Note
题目链接:https://leetcode.com/problems/ransom-note/题目:Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that wi
2016-08-12 07:31:31 2973
原创 【Leetcode】Linked List Random Node
题目链接:https://leetcode.com/problems/linked-list-random-node/题目:Given a singly linked list, return a random node's value from the linked list. Each node must have the same probability of being c
2016-08-10 11:09:03 2320
转载 Reservoir Sampling - 蓄水池抽样
问题起源于编程珠玑Column 12中的题目10,其描述如下: How could you select one of n objects at random, where you see the objects sequentially but you do not know the value of n beforehand? For concreteness, how woul
2016-08-10 11:00:36 1364
原创 【Leetcode】Insert Delete GetRandom O(1) - Duplicates allowed
题目链接:https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed/题目:Design a data structure that supports all following operations in average O(1) time.Note: Duplicate elemen
2016-08-09 22:19:11 2656 3
原创 【Leetcode】Insert Delete GetRandom O(1)
题目链接:https://leetcode.com/problems/insert-delete-getrandom-o1/题目:Design a data structure that supports all following operations in average O(1) time.insert(val): Inserts an item val to
2016-08-07 09:14:08 4462
原创 【Leetcode】Kth Smallest Element in a Sorted Matrix
题目链接:https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/题目:Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest eleme
2016-08-01 21:54:16 4096
java 贴吧合影小程序
2012-12-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人