You need to sign in or sign up before continuing.×
Ad
  • Custom User Avatar

    Having an issue with PHP test case #3 which fails whether the algorithm returns true or false.
    Or can someone please let me know if i am missing something?

    array(8) {
    [0]=>
    int(121)
    [1]=>
    int(144)
    [2]=>
    int(19)
    [3]=>
    int(161)
    [4]=>
    int(19)
    [5]=>
    int(144)
    [6]=>
    int(19)
    [7]=>
    int(11)
    }

    array(8) {
    [0]=>
    int(121)
    [1]=>
    int(14641)
    [2]=>
    int(20736)
    [3]=>
    int(36100)
    [4]=>
    int(25921)
    [5]=>
    int(361)
    [6]=>
    int(20736)
    [7]=>
    int(361)
    }

    ✘ Failed asserting that true matches expected false.

    array(8) {
    [0]=>
    int(121)
    [1]=>
    int(144)
    [2]=>
    int(19)
    [3]=>
    int(161)
    [4]=>
    int(19)
    [5]=>
    int(144)
    [6]=>
    int(19)
    [7]=>
    int(11)
    }

    array(8) {
    [0]=>
    int(121)
    [1]=>
    int(14641)
    [2]=>
    int(20736)
    [3]=>
    int(36100)
    [4]=>
    int(25921)
    [5]=>
    int(361)
    [6]=>
    int(20736)
    [7]=>
    int(361)
    }

    ✘ Failed asserting that false matches expected true.