recursive tag

18 questions


3 answers
81 views
0
Questions about recursive functions (Tower of Hanoi, etc.)

I studied alone to realize the Tower of Hanoi, but I couldn't do itI saw the code through googling.Yes. I saw the code, so I didn't know what it meant, so I tried debugging it.But it's not easy to und...

2 years ago

1 answers
97 views
0
Recursive function question 55 from the Python Euler project

def func(list,n): list1 = [] for i in list: int1 = Lychrel(i) if symmetry(int1) == False: list1.append(int1) if n > 0: return func(list1,n-1) else: return len(list1)I solved question 55 in Eul...

2 years ago

1 answers
75 views
0
Questions about Python Recursive Functions

Recently, I am studying algorithms using Python in letcode. I am studying the code to perform permutation as shown below, but there is something I don't understand in the middle. from typing import Li...

2 years ago

1 answers
87 views
0
Java Recursive Call (Novice)

public void preorder(int index) { // Create Content if(aTree[index] != null) { System.out.print(aTree[index]); preorder(2 * index); preorder(2 * index + 1); } }Simple tree potential traversal fu...

2 years ago

1 answers
78 views
0
Can we use a recursive function to express an ordinal sequence in Python?

Can we use a recursive function to express an ordinal sequence in Python? It's like representing a Fibonacci sequence as a recursive function.

2 years ago

1 answers
119 views
0
Java Seng Basic Question (Method, make a triangle with a for statement) (Please help me...)

import java.util.Scanner;class Recursion{ //method public void star(int x){ if(x>0){ printBlank(x); printStar(x); System.out.print(\n); star(x-1); } else return; } public void printBlank(...

2 years ago

1 answers
106 views
0
To output a list of Python recursive function utilization index values

The code I made is listn=[] #emptylist def searchn(list, key): #searchn function definition for n in range (len(list)): if list[n]==key: listn.append(n) print(listn) Like this, let the for statement...

2 years ago

1 answers
103 views
0
c++ Question about code flow when tree mid-interval is carried out as a recursive function

#include <stdio.h>#include BST.hint main(){ BST myBSTtree; myBSTtree.BST_InsertNode(5, 500); myBSTtree.BST_InsertNode(3, 300); myBSTtree.BST_InsertNode(2, 200); myBSTtree.BST_InsertNode(4, 400);...

2 years ago
« - 2 -

© 2024 OneMinuteCode. All rights reserved.