Objective
Write a function that returns 1 when two byte slices taken from the same array share at least one byte, and 0 when they do not.
Steps
$ ranges_overlap(buf, 6, buf + 4, 6)
1
$ ranges_overlap(buf, 4, buf + 4, 4)
0
$ ranges_overlap(buf, 0, buf, 8)
0
Expected files
Allowed functions
None. Write every helper yourself.
Allowed headers

Objective
Write a function that returns 1 when two byte slices taken from the same array share at least one byte, and 0 when they do not.
Steps
$ ranges_overlap(buf, 6, buf + 4, 6)
1
$ ranges_overlap(buf, 4, buf + 4, 4)
0
$ ranges_overlap(buf, 0, buf, 8)
0
Expected files
Allowed functions
None. Write every helper yourself.
Allowed headers

Tests
Run the tests to grade your code