Ad
  • Custom User Avatar

    res

  • Custom User Avatar

    damn you're right I didn't see that, my bad

  • Default User Avatar

    thanks for observation, fixed the translation in the following fork

  • Custom User Avatar

    You have to convert them from one base to the other before applying the operator and back after that.

  • Custom User Avatar

    You should make the argument optional in your code I think. It's like that in other languages too.

  • Custom User Avatar

    Error in Java tests:

    ./src/test/java/SolutionTest.java:35: error: method orArrays in class OrArrays cannot be applied to given types;

           OrArrays.orArrays(new int[]{1, 0, 3}, new int[]{1, 2, 3}, 3));
                    ^
    

    required: int[],int[]
    found: int[],int[],int

  • Default User Avatar

    On researching bitwise operators it seems they apply to binary digits not decimal digits. I understand the output of OR is 1 if either of the inputs are 1 and 0 if both of the inputs are 0. How does this apply to decimal digits?