Recursion in computer science is a method of problem solving where the solution to a problem depends on solutions to smaller instances of the same problem.
3
votes
0answers
241 views
Going back in a recursive activity (FileSystem like)
I have an app that creates recursively multiple instance of an activity as it traverses a file system (one activity per folder). I retrieve data via Intent when moving forward in the activity stack ...
2
votes
0answers
38 views
Find numbers in the groups using the sum and number of items in groups
I have 50 distinct integer numbers. A person has divided them into groups and has shown me the sum of numbers in each group and the number of items in each group. I want to find the numbers in the ...
2
votes
0answers
1k views
Java Minimax Alpha-Beta Pruning Recursion Return
I am trying to implement minimax with alpha-beta pruning for a checkers game in Java. My minimax algorithm works perfectly. My code runs with the alpha-beta code in place. Unfortunately, when I play ...
2
votes
0answers
34 views
recursive series mupad
I am trying to find the sum from n=1 to n=infinity of the following series:
A(n)=T/(n+1)*{a1*T^2*A(n-3)/((n-1)*n) + a2*T*A(n-2)/n + a3*A(n-1)}
with
A(-1)=A(0)=0
A(1)=T*a1/2
using mupad. Is it ...
2
votes
0answers
210 views
MySQL Recursive Stored Procedure with Cursor & View Is Not Refreshing
I have a working MySQL 5.5 stored procedure that calls itself recursively.
I needed to execute a dynamic sql query that is unique with every call, then loop through all the values from the query. To ...
2
votes
0answers
188 views
Stuck on recursive Fork/Join
I have a method that returns a set of Points, I'm certain that the for loop portion of this method could be split into a RecursiveTask that returns a set of points for each thread.
I've tried a ...
2
votes
0answers
174 views
Haskell tips/why doesnt this scale linearly?
My friend wrote a program which compares random arrangements of die faces to find the one with the most evenly distributed faces - especially when the faces are not a mere sequence.
I translated his ...
2
votes
0answers
197 views
Python. Recursive nesting in equation building (physical chemistry)
Do you have any experience with recursive algorithms? (I bet you do.)
I'm new to coding (1 week of every now and again coding) and I've been working on something (explanation below). I want to code ...
2
votes
0answers
251 views
Starting Level with multidimensional array
I have this organized array which works nice with below recursion function.
Array
(
[6] => Array
(
[0] => Array
(
[id_parent] => 6
...
2
votes
0answers
501 views
ForEach TreeNode.Nodes Pulls Out Null Node
I have two recursive methods that are meant to check/uncheck all of the TreeNodes in a .NET TreeView The methods are very simple:
private void SetAllNodes(TreeNode rootNode, bool value)
{
...
2
votes
0answers
202 views
Find first parent that satisfies condition sql server
So I'm faced with a bit of a difficult problem, at least for me.
Imagine I'm working with not-so-fictional hierarchy data that contains branches, regions, etc. I've got some code that consumes data ...
2
votes
0answers
676 views
Recursive CTE in MySql for tree structure (adjacency list)
I'm just starting out with MySQL (I come from using SQL Server previously). I haven't yet started implementing anything in MySQL, just researching how to do things and what problems I might ...
1
vote
0answers
48 views
How to speed up a recursive CTE
Given the following recursive CTE (simplified a bit for my example):
WITH myCTE (sort, parentid, myid, level, somedata)
AS
(
-- Anchor member definition
SELECT
CAST(ROW_NUMBER() ...
1
vote
0answers
23 views
Converting BST to DLL in Java
I'm trying to convert a binary search tree to a doubly, circular linkedlist without the use of any helper methods. This code is only returning the larger half of the values and the smaller values are ...
1
vote
0answers
17 views
Git submodule with same name
I am trying to make repo like:
server
\ module_1
\ library
\ module_2
\ library
Whereis modules its stand-alone programs, using the same library. They should work/compile without server ...