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.
d = dict(coordinates)
y = d.values()
x = d.keys()
min_x = min(x)
max_x = max(x)
min_y = min(y)
max_y = max(y)
ret = "YES"
for el in coordinates:
if (el[0] > min_x) & (el[0] < max_x) & (el[1] > min_y) & (el[1] < max_y):
ret = "NO"
break
return ret
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Points on a Rectangle
You are viewing a single comment's thread. Return to all comments →
def solve(coordinates):