- 1

New Licence

Soo I Have been Working on this, I don't know how to optimize it to pass the code coach What is the problem? Lesson: https://www.sololearn.com/coach/18 https://code.sololearn.com/cRE3Q6QcpOUv/?ref=app

24th Feb 2020, 5:43 AM
Rodrigo Sanchez
Rodrigo Sanchez - avatar
2 Respuestas
+ 1
your array is too short try input: "eee\n 2\n bbb aaa ccc ddd" you get: [aaa, bbb, ccc, ddd, eee] list [[aaa, bbb], [ccc, ddd]] arr 40 eee is not in arr, because for() stops at the end of arr, at name ddd,, not eee and return wrong answer then your code produce warning because you use unchecked raw ArrayList for better result, use extra <> in declaration: //ArrayList<String> list = new ArrayList(); ArrayList<String> list = new ArrayList<>();
24th Feb 2020, 9:03 AM
zemiak
0
Thank You So Much For Feed Back I Will Try To Fix
25th Feb 2020, 6:51 AM
Rodrigo Sanchez
Rodrigo Sanchez - avatar