Skip to content

Conversation

yuganshmahajan
Copy link

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant