原创 [LeetCode]116 Populating Next Right Pointers in Each Node
https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node/ http://blog.csdn.net/linhuanmars/article/d
原创 LeetCode Sumary - Graph
Clone GraphBFS
原创 [LeetCode]138 Copy List with Random Pointer
https://oj.leetcode.com/problems/copy-list-with-random-pointer/ http://blog.csdn.net/linhuanmars/article/details/2246359
原创 [LeetCode]117 Populating Next Right Pointers in Each Node II
https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/ http://blog.csdn.net/linhuanmars/articl
原创 [LintCode] Compare Strings
http://lintcode.com/en/problem/compare-strings/ public class Solution { /** * @param A : A string includes Uppe
原创 Quick Sort
public static <T> void quickSort(T[] items) { quickSort(items, null); } public static <T> void quickSort(T[] items
原创 [Twitter] Fibonacci Sequence
Question:Given a number n, give me a function that returns the nth fibonacci number. Running time, space complexity, ite
原创 [Twitter] Divide Without / Or %
Question:Implement Integer division without using / or %.http://www.glassdoor.com/Interview/Implement-integer-division-w
原创 [LeetCode] Sliding Window Maximum
Question:A long array A[] is given to you. There is a sliding window of size w which is moving from the very left of the
原创 [LeetCode] replace into a Cyclic Sorted List
Question:Given a node from a cyclic linked list which has been sorted, write a function to insert a value into the list
原创 [LeetCode] Find the k-th Smallest Element in the Union of Two Sorted Arrays
Question:Given two sorted arrays A, B of size m and n respectively. Find the k-th smallest element in the union of A and
原创 [LeetCode] A Distance Maximizing Problem
Question:Given an array A of integers, find the maximum of j-i subjected to the constraint of A[i] < A[j].// O(n) public
原创 [LeetCode] Determine If Two Rectangles Overlap
Question:Given two axis-aligned rectangles A and B. Write a function to determine if the two rectangles overlap.http://l
原创 [LeetCode] Multiplication Withtout Division
Question:There is an array A[N] of N numbers. You have to compose an array Output[N] such that Output[i] will be equal t
原创 Quick Sort
public static <T> void quickSort(T[] items) { quickSort(items, null); } public static <T> void quickSort(T[] items