You are given two variables:
Your task is to:
You must understand and handle the signed-to-unsigned promotion trap. Use your own logic to make the comparison accurate as per actual numeric intent.
Example-1
Input: a = -1, b = 1 Output: 1 (Since -1 is less than 1)
Example-2
Input: a = 250, b = 240 Output: 1 (Since a is int_8t, it can hold value -128 to +127 only, so if we assign 250 it will be considered as -6 in decimal)
Example-3
Input: a = -128, b = 255 Output: 1
Test Cases
Test Results
Input
-1 1
Expected Output
1