• + 2 comments

    Yes it would have been memory efficient and less time consuming but as this passes all test cases so have not made other effort, but it should be good programming practise to use StringBuffer instead. :)