/ Test /

Record Case Detail

Notes

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

Stderr

=================================================================
==52847==ERROR: AddressSanitizer: heap-use-after-free on address 0x606000000228 at pc 0x00000051bcf5 bp 0x7ffd465c4820 sp 0x7ffd465c4818
READ of size 8 at 0x606000000228 thread T0
    #0 0x51bcf4  (/out/package/pre2+0x51bcf4)
    #1 0x51c364  (/out/package/pre2+0x51c364)
    #2 0x51c40c  (/out/package/pre2+0x51c40c)
    #3 0x522d0e  (/out/package/pre2+0x522d0e)
    #4 0x7f89f0568b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #5 0x41f359  (/out/package/pre2+0x41f359)

0x606000000228 is located 40 bytes inside of 56-byte region [0x606000000200,0x606000000238)
freed by thread T0 here:
    #0 0x518538  (/out/package/pre2+0x518538)
    #1 0x51c3c7  (/out/package/pre2+0x51c3c7)
    #2 0x51c40c  (/out/package/pre2+0x51c40c)
    #3 0x522ce0  (/out/package/pre2+0x522ce0)
    #4 0x7f89f0568b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

previously allocated by thread T0 here:
    #0 0x5177c0  (/out/package/pre2+0x5177c0)
    #1 0x51c04c  (/out/packag

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