摘要:
A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message conta... 阅读全文
摘要:
http://www.acmerblog.com/leetcode-lru-cache-lru-5745.htmlhttps://oj.leetcode.com/discuss/1188/java-is-linkedhashmap-considered-cheatinghttp://docs.ora... 阅读全文
摘要:
(转)http://www.cnblogs.com/hubingxu/archive/2012/02/21/2361281.htmlimportjava.util.HashMap;importjava.util.Iterator;importjava.util.LinkedHashMap;impor... 阅读全文
摘要:
http://book.douban.com/annotation/15154366/Q: java.util.Arrays 中使用的 sort 采用的是什么算法?A: java中Arrays.sort使用了两种排序方法,quick sort 和优化的 merge sort。Q: 为什么采用两种排序... 阅读全文
摘要:
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret... 阅读全文
摘要:
Table:Person+-------------+---------+| Column Name | Type |+-------------+---------+| PersonId | int || FirstName | varchar || LastName ... 阅读全文
摘要:
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possibl... 阅读全文
摘要:
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ... 阅读全文
摘要:
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes... 阅读全文
摘要:
Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume that there will be on... 阅读全文