Home » Tag Archives:recursion (page 2)

Tag Archives: recursion

Java – Understanding Recursion

December 28, 2021 Java Leave a comment

Questions: Can someone please explain to me why this prints out 1 2 3 4 5? I figured it would print out 4 3 2 1 0 but my book and eclipse both say I’m wrong. public class whatever { /** * @param...

Drawing a tree using recursion

December 27, 2021 Java Leave a comment

Questions: I am trying to draw a tree using recursion. The tree needs to look like this: A short summary of how I’m supposed to do it: The trunk of the tree has length of length and width width ...

Implementing recursion in Java

December 27, 2021 Java Leave a comment

Questions: Just to be clear, this is not a homework assignment, I study CS in my own time! I recently purchased a book entitled ’50 puzzles for logical thinking’ by Charles Phillips. I sta...