Is Rectangle?

 https://www.interviewbit.com/old/problems/is-rectangle/

int Solution::solve(int A, int B, int C, int D) {
     if (((A==B)&&(C==D))||((A==C)&&(B==D))||((A==D)&&(B==C))){
        return 1;
    }else{
        return 0;
    }
}
 

Comments

Popular posts from this blog

Perfect Peak of Array

Sort array with squares!