Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

=================================================================
==21646==ERROR: AddressSanitizer: heap-use-after-free on address 0x6060000000a8 at pc 0x00000051bf35 bp 0x7fff03b7eec0 sp 0x7fff03b7eeb8
READ of size 8 at 0x6060000000a8 thread T0
    #0 0x51bf34  (/out/package/pre2+0x51bf34)
    #1 0x51c614  (/out/package/pre2+0x51c614)
    #2 0x51c62d  (/out/package/pre2+0x51c62d)
    #3 0x51c61c  (/out/package/pre2+0x51c61c)
    #4 0x51c61c  (/out/package/pre2+0x51c61c)
    #5 0x51c5cc  (/out/package/pre2+0x51c5cc)
    #6 0x5238ee  (/out/package/pre2+0x5238ee)
    #7 0x7f863e2a6b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #8 0x41f559  (/out/package/pre2+0x41f559)

0x6060000000a8 is located 40 bytes inside of 56-byte region [0x606000000080,0x6060000000b8)
freed by thread T0 here:
    #0 0x518738  (/out/package/pre2+0x518738)
    #1 0x51c651  (/out/package/pre2+0x51c651)
    #2 0x51c62d  (/out/package/pre2+0x51c62d)
    #3 0x51c61c  (/out/package/pre2+0x51c61c)
    #4 0x51c61c  (/out/package/pre2+0x51c61

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 1, which should be 0.

Please double check your code to solve this problem and try again.

Your Answer

Simple tree test 2.
find path:

0010
-1
sum:
28
depth:
5
allPathSumGreater:
1
0
covered_by:
0
contained_by:
1
traversal:
11 5 3 2 1 6 
c aa b dddd ddddf f 
1 2 3 5 6 11 
copy:
passed

JOJ Answer

Simple tree test 2.
find path:

0010
-1
sum:
28
depth:
5
allPathSumGreater:
1
0
covered_by:
0
contained_by:
1
traversal:
11 5 3 2 1 6 
c aa b dddd ddddf f 
1 2 3 5 6 11 
copy:
passed