• + 1 comment

    Right, but It does pass all the tests and I think the editor`s solution too is using 4 nested loops. What approach do you suggest for this problem ?