Redian新闻
>
有老人旅游签证到了美国以后在购买的医疗保险吗?
avatar
有老人旅游签证到了美国以后在购买的医疗保险吗?# Reunion - 探亲与陪读
r*t
1
if all the elements are positive, easy;
but what can we do if negative numbers are possible?
is there any O(n) solution?
avatar
b*e
2
有老人旅游签证到了美国以后在购买的医疗保险吗?是不是只能cover意外险?还是一
般医疗都可以?
avatar
b*h
3
how do you solve it in O(n) when all the elements are positive?
avatar
i*a
4
我们家买过,没多大作用,好像一般不能看以前就有的病

【在 b*******e 的大作中提到】
: 有老人旅游签证到了美国以后在购买的医疗保险吗?是不是只能cover意外险?还是一
: 般医疗都可以?

avatar
r*t
5
从a【0】+a【1】....一直加下去,直到你的sum大于给定的sum
然后再用你的sum一个个从a【0】开始减。。。
avatar
r*t
6
不过这个不适用于负数,因为这个方法的一个特性就是sum是递增的。
avatar
r*t
7
不过这个不适用于负数,因为这个方法的一个特性就是sum是递增的。
avatar
b*h
8
I see. Then how about find the smallest number in the array, add this number
to every element of the array and to the sum you are looking for. It is the
same problem as before.
avatar
l*a
9
what is the result to find 7 from "6 4 2 3" with your algorithm
i think at least u need the array to be sorted

【在 r********t 的大作中提到】
: 从a【0】+a【1】....一直加下去,直到你的sum大于给定的sum
: 然后再用你的sum一个个从a【0】开始减。。。

avatar
J*u
10
是阿,就是要有正数有负数的情况...谢谢
avatar
h*d
11
楼住的意思应该是subsequence,这个例子里没有

【在 l*****a 的大作中提到】
: what is the result to find 7 from "6 4 2 3" with your algorithm
: i think at least u need the array to be sorted

avatar
f*g
12
这个题,几天前讨论过,老帖找不到了
要用hashtable
avatar
J*u
13
用hashtable 的那个貌似是sum为0吧,但是这里sum不为0的,可正,可负.

【在 f***g 的大作中提到】
: 这个题,几天前讨论过,老帖找不到了
: 要用hashtable

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。