Questions like this are impossible to answer without literally testing the entire program for you. While this may sound a little extreme, think about how you know whether a program is correct: you test it. (There are deductive methods for formally verifying programs, but asking us to apply those for you is no better than asking us to test it for you; in fact, given the effort and expertise required to apply those techniques, asking us to apply those for you would arguably be an even worse question). Quite simply, Stack Overflow is not a free code-testing service.
So, what should you ask instead?
First and foremost, make sure that you've tested and debugged on your own prior to posting, and that you describe what effort you've made so far. This helps us avoid replicating your prior efforts and makes it easier to tell exactly where you're stuck.
Also, if you suspect that your code might not be correct, explain exactly why you think that. Was there a test case you were having trouble interpreting? Are you unsure if a particular output is correct? Please be sure to include these details in your question. Remember that the more specific you can be about this, the easier it's likely to be for someone to be able to help you.
If you're not sure how to get started testing your program, here are a few tips:
- Can you solve the problem "by hand"? Are you confident that you know what the correct output is for common inputs?
- Try writing a specification for each of your methods. What are the valid and invalid inputs? What are some possible error scenarios?
- Consider what inputs are valid for the program as a whole. Test for a "normal" value, some "edge cases," and an invalid input. For example, if you're writing a Fibonacci program, you should test 5, 10, or some other "normal" input value. You should also test an invalid input, such as -2 or -6 (to make sure that your program handles them "gracefully" and correctly). After you've done that, you should should test values that are close to the "boundary" of valid inputs, such as -1, 0, 1, and 2. (Statistically, many bugs occur for this kind of value).
- You may also want to read How to debug small programs by Eric Lippert. Many of the techniques described there are helpful for testing as well.
As is the case with questions about code, you should try to ask as specific of a question as possible. Some examples of possible question areas include:
- Suitability of particular test cases for a particular purpose ("does this test case test what I think it does?")
- Specific questions about how to write or execute certain test cases
- Why particular test cases are broken or failing
At a minimum, test as much of the code as you can and narrow your question down to as small of a piece as possible, and still describe what testing you've done so far.
Please note that, even if you're only asking about a specific part of code, you should still include a Minimal, Complete, and Verifiable Example as well as enough context information to enable people to understand your code and what you're trying to accomplish.
In terms of migration to Code Review, questions about broken code are off-topic there. Questions there are expected to contain working code that you're trying to improve, not broken (or potentially broken) code that you're trying to test.