0

Can someone please help me to get all possible the sub arrays of a given array

2nd Dec 2021, 3:48 PM
Chandu
Chandu - avatar
7 Réponses
+ 2
Post your attempted code, got your answer ready
2nd Dec 2021, 10:55 PM
Slick
Slick - avatar
+ 1
nice, heres what i got, may have to change the numbers to strings, is this what you were looking for? https://code.sololearn.com/c3g8IdDvv6zJ/?ref=app
3rd Dec 2021, 12:41 AM
Slick
Slick - avatar
+ 1
Can you please tell me where my code went wrong.
3rd Dec 2021, 12:46 AM
Chandu
Chandu - avatar
3rd Dec 2021, 12:55 AM
Slick
Slick - avatar
+ 1
I assumed a sub arrays would be all arrays that could be possibly made with the current order. [2,0,2] can't be made like that. If its every permutation of the list refer to the first code i posted here
3rd Dec 2021, 1:39 AM
Slick
Slick - avatar
0
But here in both codes [2,0,2] can also be a possible subarray and there are many more which I am not getting.
3rd Dec 2021, 1:36 AM
Chandu
Chandu - avatar