摘要:
智慧石的链接:http://www.zhihuishi.com/source/1312.html 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
Question:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inser... 阅读全文
摘要:
Quesion:You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the q... 阅读全文
摘要:
Question:Given two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted array.Note:You may assume thatnums1has enough space (size that... 阅读全文
摘要:
Question:Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".Analysis:思路一:首先将二进制字符串转化成十进制,然后十进制相加,最... 阅读全文
摘要:
Question:Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant di... 阅读全文