IsBetween

Easy

Given three integers, return whether the third is between the other two.

The first integer is not necessarily smaller than the second. Non inclusive.

Parameter(s):

  • a: first integer
  • b: second integer
  • c: third integer

Returns:

  • boolean: whether the third integer is between the other two

Constraints:

  • -2147483647 ≤ a ≤ 2147483647
  • -2147483647 ≤ b ≤ 2147483647
  • -2147483647 ≤ c ≤ 2147483647

Example 1:

Input:

1 2 3

Output:

false

Example 2:

Input:

1 3 2

Output:

true