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.
This approach construct a dict whose keys are x values and the dict values are sets of the encountered y values. If the length of any set of y values for an x is > 1, that x doesn't map to a single value.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Functions or Not?
You are viewing a single comment's thread. Return to all comments →
Here's a working solution in Clojure:
This approach construct a dict whose keys are x values and the dict values are sets of the encountered y values. If the length of any set of y values for an x is > 1, that x doesn't map to a single value.