2018年8月31日

摘要: 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 inserted in or 阅读全文
posted @ 2018-08-31 10:52 jydd 阅读(64) 评论(0) 推荐(0)

2018年8月30日

摘要: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction 阅读全文
posted @ 2018-08-30 17:03 jydd 阅读(61) 评论(0) 推荐(0)
摘要: Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Follow up: If 阅读全文
posted @ 2018-08-30 16:34 jydd 阅读(57) 评论(0) 推荐(0)
摘要: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. 阅读全文
posted @ 2018-08-30 15:53 jydd 阅读(84) 评论(0) 推荐(0)
摘要: Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Clarification: What shoul 阅读全文
posted @ 2018-08-30 11:08 jydd 阅读(58) 评论(0) 推荐(0)

2018年8月27日

摘要: Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra spa 阅读全文
posted @ 2018-08-27 15:06 jydd 阅读(62) 评论(0) 推荐(0)
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 以上 阅读全文
posted @ 2018-08-27 10:29 jydd 阅读(63) 评论(0) 推荐(0)

2018年8月26日

摘要: Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Note: 阅读全文
posted @ 2018-08-26 17:22 jydd 阅读(63) 评论(0) 推荐(0)

2018年8月24日

摘要: Given a 32-bit signed integer, reverse digits of an integer. Note:Assume we are dealing with an environment which could only store integers within the 阅读全文
posted @ 2018-08-24 19:27 jydd 阅读(83) 评论(0) 推荐(0)
摘要: Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the numbe 阅读全文
posted @ 2018-08-24 15:38 jydd 阅读(99) 评论(0) 推荐(0)

导航