由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Quant版 - Solve this task using recursion. how to ?
相关主题
A statistics question[合集] 两个面试题(probability)
[合集] 小题目(2006/07/16)--圆圈上顺时---recursive solution再说几个不成功的面经吧
[合集] 青蛙跳问题[合集] interview question 2
fibonacci recursiona probability question
[合集] 面试问题 (转载)谁讲讲representation theorem
[合集] 一道面试c程序题What is the solution of the recursive formula?
青蛙跳问题大家一般leetcode上做了多少题后,才
有没有熟悉change numeraire的?关于利率model,[合集] two Stochastic problems
相关话题的讨论汇总
话题: solve话题: recursion话题: task话题: using话题: terms
进入Quant版参与讨论
1 (共1页)
i***0
发帖数: 8469
1
Solve this task using recursion. how to ?
“Given a string build all possible non-zero length substrings from it.
Example
Input:
abc
Output:
a
b
c
ab
ac
bc
abc
Solve this task using recursion.”
j*******2
发帖数: 18
2
This is my version in Java:

public static void printsubString(char[] terms, int i, String last){
if(i == terms.length)
return;

for(int j = i; j < terms.length; j++){
System.out.println(last + String.valueOf(terms[j]));
printsubString(terms,j + 1, last + String.valueOf(terms[j]));
}
}
1 (共1页)
进入Quant版参与讨论
相关主题
[合集] two Stochastic problems[合集] 面试问题 (转载)
[合集] [brainteaser] CrazyRunning[合集] 一道面试c程序题
[合集] 如何回答“如何处理枯燥的工作”问题青蛙跳问题
[合集] MATLAB 中Large-Scale Medium-Scale 有啥区别有没有熟悉change numeraire的?关于利率model,
A statistics question[合集] 两个面试题(probability)
[合集] 小题目(2006/07/16)--圆圈上顺时---recursive solution再说几个不成功的面经吧
[合集] 青蛙跳问题[合集] interview question 2
fibonacci recursiona probability question
相关话题的讨论汇总
话题: solve话题: recursion话题: task话题: using话题: terms