摘要:
Problem Description:Given an array of integers that is alreadysorted in ascending order, find two numbers such that they add up to a specific target n... 阅读全文
摘要:
Again, a classic interview question of linked list. Similar to Linked List Cycle, we maintain two pointers fast and slow: fastmove two steps at one ti... 阅读全文
摘要:
A classic interview question of linked list. The idea is to maintain two pointers, one move one step at a time and the other move two steps at a time.... 阅读全文
摘要:
This problem has a long story. There are just too many solutions on the web and it can be studied for a long time before you fully grasp it. Morever, ... 阅读全文
摘要:
This is a classic problem for hash table. The basic idea is to maintain a hash table for each element innums, using the element as key and its index (... 阅读全文
摘要:
Well, this problem looks easy at first glance. However, to get a bug-free code may be not that easy.The total square is simply equal to the sum of the... 阅读全文