Given two integers a and b, return the absolute value of their difference.
Example 1: Input: a = 10, b = 3 Output: 7
Example 2: Input: a = -5, b = 5 Output: 10
Constraints: -1000 <= a, b <= 1000
Given two integers a and b, return the absolute value of their difference.
Example 1: Input: a = 10, b = 3 Output: 7
Example 2: Input: a = -5, b = 5 Output: 10
Constraints: -1000 <= a, b <= 1000
Copyright 2026 algowars. All rights reserved.
Input 1 (integer)
10
Input 2 (integer)
3
Output 1 (integer)
7