Problem Link - CodeChef: Practical coding for everyone
My Solution - CodeChef: Practical coding for everyone
Can someone tell me which test case was making my solution wrong ?
Also, suggestions will be welcome.
Problem Link - CodeChef: Practical coding for everyone
My Solution - CodeChef: Practical coding for everyone
Can someone tell me which test case was making my solution wrong ?
Also, suggestions will be welcome.
one of the error is the size of arr. It should be 11.
The G’ s will range from 1 to 10 right ? So, that is 10 elements. That’s why I took arr[10].
Indexing is Zero-Based just think about it and then see your either you have to resize the arr or change the loop conditions for input and checking