Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
0 answers
13 views

I’m trying to reason about a recursive algorithm on trees and I feel like I’m missing something subtle. I have an immutable binary tree (not a BST) where each node has an int value. I want to compute ...
1 vote
1 answer
129 views

I am getting what I believe is an infinite loop happening when I am trying to create view models from my model data, i.e. mapping them. The error I get is a 'stack overflow error'. I believe the ...
-8 votes
0 answers
86 views

I am a student in first year of computer science, and for my semester project I have to create a 2D game with mazes. I have to write an algorithm that creates mazes using the recursive division, and I ...
-4 votes
0 answers
42 views

so I was trying to reverse an array by recursion so the code logic is we are swaping right most end value to the left most end. I have implemented logic but the thing is My recursion function retuns ...
2 votes
1 answer
77 views

I'm building a FastAPI application and modeling a forum-style comment system using Pydantic v2. Each comment can contain replies, and those replies can contain more replies, recursively, similar to ...
4 votes
3 answers
177 views

I keep almost solving this. I've got a data set of python dictionaries that contain both lists and dictionaries that also contain lists and dictionaries. I want to find all instances of a substring in ...
3 votes
2 answers
169 views

I do understand I have mistakes in this code #include <stdio.h> #include <stdlib.h> #include <string.h> int diziyi_yazdır(int dizi[], int dizi_uzunluğu) { for (int i ...
-2 votes
1 answer
189 views

I’m trying to implement an in-place Quick Sort in Python. I have two slightly different versions of my partitioning logic, and I’m confused because both seem correct on small arrays, but the second ...
3 votes
1 answer
136 views

At the risk of asking a question with an obvious solution: if I have a function in J that takes two arguments and returns two arguments and I want to accumulate the answer's second argument and to use ...
3 votes
3 answers
90 views

I am working on LeetCode problem 22. Generate Parentheses using a recursive backtracking approach in Python. The function works, but I’m having trouble understanding the flow of recursion, ...
1 vote
2 answers
170 views

My question is focused specifically on assembly (intel). In C for example, recursion can be done with a simple return command but in assembly I feel like there's a lot more things going on, especially ...
0 votes
1 answer
87 views

this is kind of a continuation of an improved version of an old question of mine so basically I have a recursive Angular form and I’m using to manage a folder hierarchy. Each folder has a radio button ...
1 vote
2 answers
158 views

Let's say our binary tree (bt) looks like this: Node* root = new Node(); root->left = new Node("B"); root->right = new Node(); root->right->right = new Node("A");...
-1 votes
2 answers
173 views

# Iterative factorial function to safely compute very large factorials without hitting Python's recursion limit. # Recursive functions have a maximum depth, usually 1000, and factorial(2000) would ...
2 votes
1 answer
119 views

I have a recursively defined function my_func that is jitted using jax.jit from the jax library. It is defined below: # Imports import jax import jax.numpy as jnp from functools import partial import ...
Ben's user avatar
  • 539

15 30 50 per page
1
2 3 4 5
...
3163

AltStyle によって変換されたページ (->オリジナル) /