I'm wondering what's the expected answer for these test cases involving \n and spaces? The problem itself didn't mention how to deal with single "\n". This seems to be confusing to me
file name with space.txt = 25 // so spaces are part of file name and should be counted
dir\n file.txt = 12 // i suppose it's 4 spaces + file.txt ? how about dir here? why it's not included?
dir\n file.txt = 16 // i suppose it's 8 spaces + file.txt? same question as above
a\n\tb.txt\na2\n\tb2.txt=9 // why? what's a2 here? maybe it's a/b.txta2 but i dont see how \n is handled here
Answering myself- \n seems to mean that the folder is on the first layer, so a\n\tb.txt\na2\n\tb2.txt is
[blank and tabs] b.txt
[blank and tabs] b2.txt
it would be helpful if this example can be explained in the problem description...