原创 [LeetCode]187 Repeated DNA Sequences
https://oj.leetcode.com/problems/repeated-dna-sequences/ public List<String> findRepeatedDnaSequences(String s) {
原创 [LeetCode] Rotate Array / List
Question:http://leetcode.com/2010/04/rotating-array-in-place.html Rotate a one-dimensional array of n elements to the ri
原创 [LintCode] Kth Prime Number
http://lintcode.com/en/problem/kth-prime-number/# class Solution { /** * @param k: The number k. * @return
原创 [LintCode] First Bad Version
http://lintcode.com/en/problem/first-bad-version/ /** * public class VersionControl { * public static boolean isBa
原创 [LeetCode] String Reorder Distance Apart
Question:Given a string of lowercase characters, reorder them such that the same characters are at least distance d from
原创 [Twitter] Generate chars and *
Question:Given a list of string, like (a, b, c), return a list: (*, *, *), (a, *, *), (*, b, *), (*, *, c), (a, b, *), (
原创 [Twitter] Lowest Level Common Ancestor
Question:In a binary integer value tree, find the lowest level common ancestor of two values.http://www.glassdoor.com/In
原创 [LeetCode]186 Reverse Words in a String II
Question:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is
原创 [Twitter] Max Stack
Question:Design a max stack using one stack. ?One stack? I think it is two stacks.class MaxMinStack<T> { private Stack
原创 [LeetCode]189 Rotate Array
https://oj.leetcode.com/problems/rotate-array/ public class Solution { public void rotate(int[] nums, int k) {
原创 [Twitter] All possible pickings
Question: Given n sets of choices: (1, 2, 3), (a, b, c), (i, ii, iii).You pick one element from each set of choices. Gen