Straightening multilevel DLL

Here is my solution of Straightening multilevel DLL.
This solution is passing all test cases on leetcode. But all the test cases are failed on the coding blocks platform.