摘要: Question: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... 阅读全文
posted @ 2015-09-18 21:06 江湖小妞 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Question:Given an array of integers and an integerk, find out whether there are two distinct indicesiandjin the array such thatnums[i] = nums[j]and th... 阅读全文
posted @ 2015-09-18 20:34 江湖小妞 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Question:Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice i... 阅读全文
posted @ 2015-09-18 18:05 江湖小妞 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Question:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra sp... 阅读全文
posted @ 2015-09-18 17:50 江湖小妞 阅读(126) 评论(0) 推荐(0) 编辑