摘要: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文
posted @ 2016-04-14 13:45 新一代的天皇巨星 阅读(146) 评论(0) 推荐(0)
摘要: 121. Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitte 阅读全文
posted @ 2016-04-14 13:31 新一代的天皇巨星 阅读(306) 评论(0) 推荐(0)
摘要: Given a singly linked list, determine if it is a palindrome. Follow up:Could you do it in O(n) time and O(1) space? Linked List Two Pointers With extr 阅读全文
posted @ 2016-04-14 13:20 新一代的天皇巨星 阅读(239) 评论(0) 推荐(0)