Leetcode string

In this problem they have not stated how the output should exactly be.Is it asking to print the 3 arrays ??

in this question string is given to you and you have to return the nested list of integers

Sir can you show the implementation to return the nested list of integers from the strings from c++


this is my solution

better approach will be to use stack rather than recursion
image