You are viewing a single comment's thread. Return to all comments →
Hi. You forgot to do explicitly convert to long in base case. Modify
if (c_lib <= c_road || cities == null || cities.size() == 0) return c_lib * n;
to this:
if (c_lib <= c_road || cities == null || cities.size() == 0) return (long) c_lib * n;
Seems like cookies are disabled on this browser, please enable them to open this website
Roads and Libraries
You are viewing a single comment's thread. Return to all comments →
Hi. You forgot to do explicitly convert to long in base case. Modify
to this: