
数组
yiayia070614
在阿里做苹果业务
展开
-
LeetCode 121 -- Best Time to Buy and Sell Stock I
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 (ie, buy one and sell one share of the stock),原创 2016-09-11 13:41:13 · 256 阅读 · 0 评论 -
LeetCode 14 -- Longest Common Prefix
leetcode 14: Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. 解答: 给定一组字符串,找出他们的最长公共子序列。 public class Solution { public Strin原创 2016-09-11 16:15:57 · 225 阅读 · 0 评论