Recursive method that finds a random given password
I have a task in Java to build a recursive method only with no using any loops (for loops, while loops etc… cant use them) in the method, that can crack any random password (the password made using only lower case letters).
I only succeed to built a code that does it using loops.
Someone knows how to solve it and can help me?
For example the password is “test”.
Recursive Method to shift Character
`I have to implement the method
Without any other parameters, no class variables or other methods
The method is supposed to shift the char with the max ASCII value to the beginning of the string text and return text
some test cases
Recursively find index of largest element in an array
So I’m working on this question that’s ask me to use recursion to make a method that returns the index of the largest element in an array of ints using this header “private static int findLargest (int [] items, int first, int last)”. This is what I wrote and while it does works as intended it gives a StackOverflowError if I feed it an array higher then 5 elements.