MCPcopy Create free account
hub / github.com/chaharnishant11/CodeIn10DSA / sequence

Function sequence

Recursion/Code/Subsequences.py:4–13  ·  view source on GitHub ↗
(s,temp,index)

Source from the content-addressed store, hash-verified

2# Program to find all possible subsequences of a given string/sequence
3
4def sequence(s,temp,index):
5 if (len(s)==index):
6 print(temp,end=" ")
7 return
8
9 # take
10 sequence(s, temp+s[index], index+1)
11
12 # not take
13 sequence(s, temp, index+1)
14
15
16S=input("Enter a string : ")

Callers 1

Subsequences.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected