Minimum Absolute Difference in an Array

  • + 0 comments

    No need in 2).

    Min should always default to max.

    In this example: int min = INT_MAX;

    Then compare abs of all consecutive pairs to min.