Ad
  • Custom User Avatar

    Marking as resolved

  • Custom User Avatar

    I've added to the description that the sequence should start at 3 not including the offset. Thanks for the feedback

  • Custom User Avatar

    I'm pretty sure Java does have precendence in the order in which terms are evaluated. It's what allows us to do stuff like this where we can "nest" statements and change multiply fields of the code without worrying about the order in which it happens.

    https://introcs.cs.princeton.edu/java/11precedence/

    edit: I agree that it's not best practice, definitely shouldn't be used in a real-world application, but for a simple kata it's useable.

  • Custom User Avatar

    Sorry, I'm confused. I thought using the Random class to generate numbers was enough. Is there something else I should implement?

  • Custom User Avatar

    I've made it such that the order of the factors doesn't matter. As long as you factor correctly, it follows the correct format, and it expands back into the original equation, it should work. Thanks!

  • Custom User Avatar

    I've fixed the solution setup, thanks for pointing that out.

    I've also edited the description to specify that only integers should be factored out, and that each factor of the original function that involves a variable must be in the form f(ax + b)(cx + d). I'm not entirely sure if that fixes the issues you've mentioned though.