You are viewing a single comment's thread. Return to all comments →
Given an array of integers, find the longest subarray where the absolute difference between any two elements is less than or equal to 1.
Did you take set theory in college? If not you were robbed.
"any two" means "there exist no pairs for which the constraint does not hold"
Not, "the new number has this property with at least one other member".
People pay for this service?
4 6 is not less than or equal to 1.
Seems like cookies are disabled on this browser, please enable them to open this website
Picking Numbers
You are viewing a single comment's thread. Return to all comments →
Did you take set theory in college? If not you were robbed.
"any two" means "there exist no pairs for which the constraint does not hold"
Not, "the new number has this property with at least one other member".
People pay for this service?
4 6 is not less than or equal to 1.