Ad
  • Custom User Avatar

    Here is a simple example for which your function returns an incorrect result:

    intervals = {{1, 4}, {3, 5}, {4, 6}};
    

    The expected result is 5 but your function returns 6.