Big Integer Compare

JavaScript Medium 2 views
Back to Questions

Problem Description

Two big integers are given as strings (may be negative). Print -1 if A < B, 0 if equal, 1 if A > B.

Input Format

One line: A B.

Output Format

One integer -1/0/1.

Sample Test Case

Input:
-20 3
Output:
-1

Constraints

|A|,|B| length up to 1e5.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next