0

SOLVED: Why my code doesn't pass tests?

Hello everyone, i try to solve problem with task "Youtube Link Finder". Input - Youtube Link, output - YouTube Video ID; my code does output video ID, but doesn't pass Tests. Pls help me... Code: https://code.sololearn.com/cmymvWHS52EW/?ref=app

17th Oct 2022, 4:18 PM
Idinahui
7 Respuestas
+ 2
These are some mistakes that i noticed Use link[200] instead of link[43] Use for (int i=0; i<ll; i++) instead of for (int i = 0; i <= ll; i++)
17th Oct 2022, 4:50 PM
SoloProg
SoloProg - avatar
+ 1
And if i use 43 as size of array code is working, why i should to change size to 200?
17th Oct 2022, 5:24 PM
Idinahui
0
SoloProg, can you explain for me: why size of array of chars Link must be 200?
17th Oct 2022, 5:18 PM
Idinahui
0
The user is the one who decides the input and the length of the string
17th Oct 2022, 5:29 PM
SoloProg
SoloProg - avatar
0
SoloProg, so what? That isn't explanation for this...
17th Oct 2022, 5:32 PM
Idinahui
0
Idinahui , I have a question Why did u choose 43 as the size of the array not something like 10?
17th Oct 2022, 6:52 PM
SoloProg
SoloProg - avatar
0
SoloProg, because 43 is max length of YouTube Link in one of formats(http:/youtube.com/watch?v=XXXXXXXXXXX)
18th Oct 2022, 3:09 AM
Idinahui