We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
you have initialized the value of x=imp-k;
but as we can assign any value to k,therefore if k>imp :- then x will be negative and after that you have used that x in the for loop also , in which when you have used c[i] where i=x;i
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Luck Balance
You are viewing a single comment's thread. Return to all comments →
you have initialized the value of x=imp-k; but as we can assign any value to k,therefore if k>imp :- then x will be negative and after that you have used that x in the for loop also , in which when you have used c[i] where i=x;i