
贪心算法
wenlyq
这个作者很懒,什么都没留下…
展开
-
82 将真分数分解为埃及分数
题目描述 分子为1的分数称为埃及分数。现输入一个真分数(分子比分母小的分数,叫做真分数),请将该分数分解为埃及分数。如:8/11 = 1/2+1/5+1/55+1/110。 接口说明 /* 功能: 将分数分解为埃及分数序列 输入参数: String pcRealFraction:真分数(格式“8/11”) 返回值: String pcEgpytFraction:分解后的埃及分数序列(格式“1/2+...原创 2019-02-11 20:26:24 · 2097 阅读 · 0 评论 -
best-time-to-buy-and-sell-stock
Say you have an array for which the i th element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one ...原创 2019-05-24 20:39:37 · 165 阅读 · 0 评论