Someone please clarify the problem statement

  • 4

    Hi, to me problem statement is super unclear and vague, can someone explain more with more testcases?

  • -4

    This problem is about the version of any app.
    for example for an app
    version1 = 1.1
    version2 = 2.2;
    or version1 = 2.2 and version2 = 1.1;

    `if( version1 > version2)
    return 1;

    else if( version1 < version2)
    return -1;

    else return 0;`

    finally we have to insure that

    case 1: if version1 is newer compare to version2 then return 1 .

    case 2: if version1 is older compare to version2 then return -1 .

    case 3: if version1 and version2 are same then return 0 .

  • 0

    got it thanks

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.