FrazArmy icon indicating copy to clipboard operation
FrazArmy copied to clipboard

Update Fraz_recursion_7_2.java

Open yuganshmahajan opened this issue 3 years ago • 0 comments

code will not work as it will break on line 13 with runtime error. We are not sure to remove ith element always, as we are not always putting the letters into out array. So we will have to check size and remove last element here.

Second, we need to initialise a new arrayList every time we are adding it into result, coz in java if we change the added list later, it will change in result too due to reference

yuganshmahajan avatar Jul 16 '22 09:07 yuganshmahajan