Skip to main content
-2 votes
1 answer
543 views

I need much a correct pseudocode of Bron–Kerbosch algorithm (it enumerates all maximal cliques in an undirected unweighted graph). I need iterative (non-recursive) solution with a stack. And the ...
ttnphns's user avatar
  • 137
0 votes
0 answers
91 views

Right now I'm trying to understand why a certain non-recursive implementation of the Heap's Permutation Algorithm works. I implemented some code of this particular version of the algorithm in python, ...
Jahleel Murray's user avatar
0 votes
1 answer
239 views

I am a novice programmer learning Python using the book: "Introduction to Computation and Programming Using Python" by John V Gurrag. I am attempting a finger exercise in Chapter 3: "...
Venugopal_V_N's user avatar
0 votes
1 answer
66 views

I'm trying to explore the binary tree. However, I have to implement recursive functions nonrecursively. I've searched several ways to convert recursion to nonrecursive. But it doesn't seem to apply to ...
sapi's user avatar
  • 1
1 vote
0 answers
73 views

I'm learning to code, I just read the chapter divide and conquer in the introduction to algorithms book. But I don't like the recursive algorithms and is very hard to my undertand it for that reason I ...
StandardIO's user avatar
0 votes
3 answers
235 views

I was wondering if someone could help me rewrite this code as non-recursive so it can compute higher numbers, my current code looks like this: def T(n): if n < 3: return n return T(...
ThomasL123's user avatar
2 votes
1 answer
94 views

I made two classes as follow: Node class class Node: def __init__(self,title): self.title = time self.child = [] And implement methods like getTitle, getChild, addChild, isEmpty:...
Jay's user avatar
  • 47
0 votes
1 answer
55 views

input console.log(removeOne([])); console.log(removeOne([1, 3, 1, 2, 1])); console.log(removeOne([1, 4, [1, 5, 1, 2]])); console.log(removeOne([1, 1, [1, 3, [1, 1, 4, 1], 2]])); output [] [ 3, 2 ] [ ...
55555555hh's user avatar
0 votes
0 answers
768 views

Beginner with MariaDB and trying to understand the syntax. I’m trying to create the simplest example and then build from there. Shouldn’t the following work? with myCTE as (SELECT 1 as MyNum, 'A' ...
W2000's user avatar
  • 1
0 votes
0 answers
40 views

Im having a problem to understand this algorithm, how would you describe it, mostly the while loops. I understand that this i an iterative function, and the use of Hoare partition scheme. But what ...
j0can's user avatar
  • 41
1 vote
2 answers
884 views

How do i make the bottom function non-recursive, ive tried but by creating new functions which is not the point in this problem. The first function is given and the inplace_quicksort_non_recursive is ...
j0can's user avatar
  • 41
0 votes
1 answer
184 views

I am trying to solve isPalindrome() question on LeetCode using non recurisve solution, When i run this code using VSCode it runs and gives me the right output, but when i run it in LeetCode compiler ...
Mahmoud Elnahal's user avatar
0 votes
1 answer
187 views

I see from this question that it can be an antipattern to mix Promises with async code. Does this, however, apply in all cases? I can't see an easy way to avoid combining them in the following code: ...
JamesTheAwesomeDude's user avatar
0 votes
1 answer
220 views

so I have this code from an exam question and I have to convert the recursive part with a loop, now I tried many times but the loop will be endless, here what I did: code with recursive int f(int n, ...
programmer99's user avatar
0 votes
0 answers
59 views

I got below recursive function written in Java. I wanted to convert it to a Dynamic program but I don't know it is right or not? I think I'm missing something here. Any guidance would be perfect. //...
Ramazan Kilimci's user avatar

15 30 50 per page
1
2 3 4 5
8