New course! Every coder should learn Generative AI!
Try a free lessonQ&A Discussions
What is a recursion in Java
3 Votes
6 AnswersFibonacci Series
5 Votes
10 AnswersExample of Recursion
0 Votes
2 AnswersTwo pairs and two GCD
1 Vote
1 AnswerRecursion question
1 Vote
1 Answerwhat is srand?
1 Vote
3 AnswersRecursive function
0 Votes
4 AnswersI need to design a recursive function called replicate recur which will receive two arguments: times which is the number of times to repeat and data which is the number or string to be repeated.
The function should return an array containing repetitions of the data argument.
For instance, replicate_recur (3, 5) should return [5,5,5].
If the times argument is negative or zero, return an empty array. If the argument is invalid, raise ValueError.
0 Votes
4 Answershow is recursion used?
0 Votes
2 Answersreturn not
0 Votes
4 AnswersWhat is recursion?
0 Votes
4 AnswersWhat is base case?
1 Vote
9 AnswersWhat is an exit condition?
0 Votes
2 AnswersHot today
Media on HTML
0 Votes
Is Sololearn better or Mimo.org?
1 Votes
How to show img???
0 Votes
How to cast in python
0 Votes
How to solve this
1 Votes
Java project
0 Votes
Jungle capming
0 Votes
JavaScript
0 Votes
Editor HTML
0 Votes