You are viewing a single comment's thread. Return to all comments →
we dont think about last index. the way become fast to find last position for element.
for(int i=0;ii) { min=min<(j-i)?min:(j-i); } }
Seems like cookies are disabled on this browser, please enable them to open this website
Minimum Distances
You are viewing a single comment's thread. Return to all comments →
we dont think about last index. the way become fast to find last position for element.
for(int i=0;ii) { min=min<(j-i)?min:(j-i); } }