You are viewing a single comment's thread. Return to all comments →
for whoever taking a look
fyi fastest (time complexity) solution is O(m+n) takes O(r) in space (r being max range for the shots, here 10^5)
no sort (O(nlogn+mlogm)) needed no search (O(mlogn) or O(nlogm)) needed
Seems like cookies are disabled on this browser, please enable them to open this website
Mr. X and His Shots
You are viewing a single comment's thread. Return to all comments →
for whoever taking a look
fyi fastest (time complexity) solution is O(m+n)
takes O(r) in space (r being max range for the shots, here 10^5)
no sort (O(nlogn+mlogm)) needed
no search (O(mlogn) or O(nlogm)) needed