Ad
  • Custom User Avatar

    Omg thank you so much for pointing that out :') I got it! It definitely wasn't the best way to do it... I added two more else if's for when n is equal to 1 or 2, but it got the job done. Again thank you!

  • Custom User Avatar

    I am getting: "arrays first differed at element [0]; expected: 1.0 but was: 0.0" for basicTests(XbonacciTest), and "It should work with random inputs too: arrays first differed at element [0]; expected:18.0 but was: 0.0" for randomTests(XbonacciTest)

  • Custom User Avatar

    Nevermind! It's not passing the randomTests after running it again now, with the code unchanged. I've spent too long on this...

  • Custom User Avatar

    I'd like to add that it's passing the randomTests(XbonacciTest) after I took the static keyword out when declaring the method (I had it like that because I was testing by calling the method in a main method working in Eclipse). It's just not passing the basicTests(XbonacciTest) now

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution