Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
object NonContinuousSubSequences extends App {
|
||||
|
||||
private def seqR(s: String, c: String, i: Int, added: Int): Unit = {
|
||||
if (i == s.length) {
|
||||
if (c.trim.length > added) println(c)
|
||||
} else {
|
||||
seqR(s, c + s(i), i + 1, added + 1)
|
||||
seqR(s, c + " ", i + 1, added)
|
||||
}
|
||||
}
|
||||
|
||||
seqR("1234", "", 0, 0)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue