You are viewing a single comment's thread. Return to all comments →
I tried using an integer vector with the same approach. The only difference being vector int a(n+1); instead of long int *a=new long intN+1;
It did not work. Wrong answer on TCs 5 to last. The same happened on using long int vector instead of int. Could somebody enlighten me as to why?
Seems like cookies are disabled on this browser, please enable them to open this website
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
I tried using an integer vector with the same approach. The only difference being vector int a(n+1); instead of long int *a=new long intN+1;
It did not work. Wrong answer on TCs 5 to last. The same happened on using long int vector instead of int. Could somebody enlighten me as to why?