2015年12月18日

摘要: k SumGiven n distinct positive integers, integer k (k <= n) and a number target.Find k numbers where sum is target. Calculate how many solutions there... 阅读全文
posted @ 2015-12-18 07:01 一心一念 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Maximum Subarray DifferenceGiven an array with integers.Find two non-overlapping subarrays A and B, which |SUM(A) - SUM(B)| is the largest.Return the ... 阅读全文
posted @ 2015-12-18 06:59 一心一念 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Delete DigitsGiven string A representative a positive integer which has N digits, remove any k digits of the number, the remaining digits are arranged... 阅读全文
posted @ 2015-12-18 04:44 一心一念 阅读(280) 评论(0) 推荐(0) 编辑
摘要: Maximum Subarray IIGiven an array of integers, find two non-overlapping subarrays which have the largest sum. The number in each subarray should be co... 阅读全文
posted @ 2015-12-18 03:52 一心一念 阅读(233) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell StockSay you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to compl... 阅读全文
posted @ 2015-12-18 02:42 一心一念 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Happy NumberWrite an algorithm to determine if a number is happy.A happy number is a number defined by the following process: Starting with any positi... 阅读全文
posted @ 2015-12-18 01:52 一心一念 阅读(153) 评论(0) 推荐(0) 编辑

导航