Hi all,
Could someone please look at my code to this problem? Its a simple dfs with an extra iterating variable, but I'm confused as to why it's returning wrong answer. I'm 90% sure that the string processing part of my code is correct, so that leaves the dfs() function that probably has a bug in it.
vector< string > height[] is the array that I use to store the strings that are on a certain level, and I use vector< int > comma to store the position of the commas to make it easier to extract the numbers and the strings. Also, mx is the maximum height of a comment.
Thanks for your time everyone!