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
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++)
+ 1
And if i use 43 as size of array code is working, why i should to change size to 200?
0
SoloProg, can you explain for me: why size of array of chars Link must be 200?
0
The user is the one who decides the input and the length of the string
0
SoloProg, so what? That isn't explanation for this...
0
Idinahui ,
I have a question
Why did u choose 43 as the size of the array not something like 10?
0
SoloProg, because 43 is max length of YouTube Link in one of formats(http:/youtube.com/watch?v=XXXXXXXXXXX)