Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==46356==ERROR: LeakSanitizer: detected memory leaks Direct leak of 9760 byte(s) in 244 object(s) allocated from: #0 0x7f8c10897b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40) #1 0x5611324bff79 in pushBack (/out/package/ex6+0x4f79) #2 0x5611324c0688 in createFromArray (/out/package/ex6+0x5688) #3 0x5611324bf0b5 in main (/out/package/ex6+0x40b5) #4 0x7f8c0f6c8b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) Indirect leak of 240 byte(s) in 6 object(s) allocated from: #0 0x7f8c10897b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40) #1 0x5611324bff79 in pushBack (/out/package/ex6+0x4f79) #2 0x5611324c0688 in createFromArray (/out/package/ex6+0x5688) #3 0x5611324bf0b5 in main (/out/package/ex6+0x40b5) #4 0x7f8c0f6c8b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) SUMMARY: AddressSanitizer: 10000 byte(s) leaked in 250
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
Linked-List: 112976->44143->129093->77872->72715->82619->99133->88637->118336->151165->6345->76471->81493->137856->55747->128472->141719->126796->133090->30101->10763->86221->61911->87851->98526->42286->6415->52085->24661->66182->35103->126428->5122->92387->139078->119282->61615->40939->41865->28320->23489->134372->108020->151136->42598->109030->70266->74681->5516->123190->36560->35038->77033->4213->44768->46441->17625->53881->130629->11881->61059->56364->142350->154488->30772->56786->77417->146943->17450->21140->75300->27353->91774->39518->81565->62162->102075->38121->125478->4805->32347->103918->30592->141588->104535->29459->119391->147821->74265->24531->20219->139240->44211->152477->39336->56277->71643->145097->84366->76310->101482->123856->50476->51091->43444->50332->97270->119422->21559->129213->4407->113031->114780->135844->111713->68842->94860->127602->48673->93968->98149->141763->118523->80834->49239->85558->150333->2262->115510->25834->50391->39060->108821->79022->28772->123056->115015->22176->128081
JOJ Answer
Linked-List: 112976->44143->129093->77872->72715->82619->99133->88637->118336->151165->6345->76471->81493->137856->55747->128472->141719->126796->133090->30101->10763->86221->61911->87851->98526->42286->6415->52085->24661->66182->35103->126428->5122->92387->139078->119282->61615->40939->41865->28320->23489->134372->108020->151136->42598->109030->70266->74681->5516->123190->36560->35038->77033->4213->44768->46441->17625->53881->130629->11881->61059->56364->142350->154488->30772->56786->77417->146943->17450->21140->75300->27353->91774->39518->81565->62162->102075->38121->125478->4805->32347->103918->30592->141588->104535->29459->119391->147821->74265->24531->20219->139240->44211->152477->39336->56277->71643->145097->84366->76310->101482->123856->50476->51091->43444->50332->97270->119422->21559->129213->4407->113031->114780->135844->111713->68842->94860->127602->48673->93968->98149->141763->118523->80834->49239->85558->150333->2262->115510->25834->50391->39060->108821->79022->28772->123056->115015->22176->128081