Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==35216==ERROR: LeakSanitizer: detected memory leaks Direct leak of 240 byte(s) in 10 object(s) allocated from: #0 0x7fde8e73fd8b in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/liblsan.so.0+0xfd8b) #1 0x55c147687554 in Node::Node(int, int) (/out/package/lab8+0x1554) Direct leak of 32 byte(s) in 1 object(s) allocated from: #0 0x7fde8e73fd8b in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/liblsan.so.0+0xfd8b) #1 0x55c147687554 in Node::Node(int, int) (/out/package/lab8+0x1554) #2 0x7fde00000002 (<unknown module>) SUMMARY: LeakSanitizer: 272 byte(s) leaked in 11 allocation(s).
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 23, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
3 1 2 0 1 2 5 6 7 3 8 9 11 10 4
JOJ Answer
3 1 2 0 1 2 5 6 7 3 8 9 11 10 4