Redian新闻
>
【尝鲜】eye-fi, wifi sd card
avatar
【尝鲜】eye-fi, wifi sd card# PhotoGear - 摄影器材
w*1
1
原题在这:
https://oj.leetcode.com/problems/palindrome-partitioning/
根据结果分析猜是O(n*2^n),但是不会从代码分析。请教各位大牛,如果用以下代码,
怎么分析复杂度?
public void palindromeHelper(String input, List> resultList
, List curResult, int index){

if(index == input.length()){
resultList.add(new ArrayList(curResult));
return;
}
for(int i=index; iString substring = input.substring(index, i+1);
if(isPalindrome(input, index, i)){
curResult.add(substring);
palindromeHelper(input, resultList, curResult, i+1);
curResult.remove(curResult.size()-1); }
}
}
call with: palindromeHelper(s, resultList, curResult, 0);
isPalindrome()代码就不附了,最简单O(n)那种。
多谢!!
avatar
u*l
2
上周逛deal,看到4g在amazon卖2x刀。
虽然有点贵,但是就是想尝尝鲜,苦求LD批准后,下手。今天收到卡,小试了一下,果
然很有意思,特
此上来汇报一下。
1. 把卡插入电脑上,安装/运行随机软件,
基本设置(wifi点和密码,上传的pc目录,上传选项:全上传?选择上传?),
然后随机软件会把这些设置写入sd卡。
2. 把卡插入相机,设置相机选项打开eye fi卡功能。
3. 拍照后,照片就会根据设置,上传到pc(pc机开启,随机软件运行)。
还没有测试上传到网站的功能。
在android上也market到eye fi的官方app,也还没试。
希望其他在用的大虾们补充。
avatar
t*y
3
last character will be accessed n times; last second character will be
accessed n-1 times. the complexity is n+(n-1)+(n-2)+...1=O(n^2)
since you isPalindrome takes O(n), total will be O(n^3).
if you calculate isPlaindrome first, it takes O(n^2); in your recursive
function, it will take O(1) to call that function. overall complexiy will be
O(n^2).
avatar
v*a
4
eyefi sucks
failed once on the road then everything on card cannot be read any more

【在 u**l 的大作中提到】
: 上周逛deal,看到4g在amazon卖2x刀。
: 虽然有点贵,但是就是想尝尝鲜,苦求LD批准后,下手。今天收到卡,小试了一下,果
: 然很有意思,特
: 此上来汇报一下。
: 1. 把卡插入电脑上,安装/运行随机软件,
: 基本设置(wifi点和密码,上传的pc目录,上传选项:全上传?选择上传?),
: 然后随机软件会把这些设置写入sd卡。
: 2. 把卡插入相机,设置相机选项打开eye fi卡功能。
: 3. 拍照后,照片就会根据设置,上传到pc(pc机开启,随机软件运行)。
: 还没有测试上传到网站的功能。

avatar
w*1
5
多谢!!
但是从结果来看,一个长度为N的string,partition的结果个数为2^(N-1),相当于把N-
1个挡板插入N个字符里:
string: 1234
C30: 1234
C31: 1|234, 12|34, 123|4
C32: 1|2|34, 1|23|4, 12|3|4
C33: 1|2|3|4
C30 + C31 + C32 + C33 = 2^3
所以不考虑isPalindrom的影响,复杂度应该不低于O(2^N)

be

【在 t*******y 的大作中提到】
: last character will be accessed n times; last second character will be
: accessed n-1 times. the complexity is n+(n-1)+(n-2)+...1=O(n^2)
: since you isPalindrome takes O(n), total will be O(n^3).
: if you calculate isPlaindrome first, it takes O(n^2); in your recursive
: function, it will take O(1) to call that function. overall complexiy will be
: O(n^2).

avatar
u*l
6
……这么恐怖?!

【在 v***a 的大作中提到】
: eyefi sucks
: failed once on the road then everything on card cannot be read any more

avatar
t*y
7
i think you are right.
avatar
g*u
8
我09年在dell买过,也就30多一个

【在 u**l 的大作中提到】
: 上周逛deal,看到4g在amazon卖2x刀。
: 虽然有点贵,但是就是想尝尝鲜,苦求LD批准后,下手。今天收到卡,小试了一下,果
: 然很有意思,特
: 此上来汇报一下。
: 1. 把卡插入电脑上,安装/运行随机软件,
: 基本设置(wifi点和密码,上传的pc目录,上传选项:全上传?选择上传?),
: 然后随机软件会把这些设置写入sd卡。
: 2. 把卡插入相机,设置相机选项打开eye fi卡功能。
: 3. 拍照后,照片就会根据设置,上传到pc(pc机开启,随机软件运行)。
: 还没有测试上传到网站的功能。

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