Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==34968==ERROR: LeakSanitizer: detected memory leaks Direct leak of 72 byte(s) in 3 object(s) allocated from: #0 0x7fad85370d8b in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/liblsan.so.0+0xfd8b) #1 0x5649bd994554 in Node::Node(int, int) (/out/package/lab8+0x1554) Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7fad85370d8b in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/liblsan.so.0+0xfd8b) #1 0x5649bd994554 in Node::Node(int, int) (/out/package/lab8+0x1554) #2 0x7fad00000000 (<unknown module>) SUMMARY: LeakSanitizer: 88 byte(s) leaked in 4 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 2 1 2 3 4
JOJ Answer
3 2 1 2 3 4