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.

learn more… | top users | synonyms (1)

1
vote
0answers
12 views

Cannot find the proper base case for a recursive function to 'generate' matrices?

I have a recursive function to generate matrices, called lights. This function is called in light_and_color. light_col_permutation, called in lights, gives a vector of vector of vector of int. So, ...
-1
votes
0answers
24 views

Stack_overflow with tree traversal

My tree is defined as below: (It's just for better understanding, my data type is much more complicated.) type tree = { mutable value : int; mutable nodes : tree list } I need to find a ...
1
vote
1answer
66 views

Recursive search for values in a list of Hashmaps with java

I'm trying to loop through a list of hashmaps and form a tree like structure.The input(list of hashmaps) and the desired output(list of hashmaps) are as below: input: [{State=Tamil Nadu, ...
-1
votes
0answers
37 views

Php Recursive function on array for tree view

I have following array: Array ( [1] => 0 [2] => 1 [3] => 2 [4] => 3 [5] => 1 [6] => 0 ) keys of this array is unique, and values showing parent of key. ...
0
votes
1answer
58 views

Oracle SQL recursion to find first instance of non-null column value

I'll try and explain how the table is laid out so that what I need might be a bit more clear. ############################################################### # cid # iid # child cid # child iid # ...
1
vote
1answer
29 views

PHP Recursive database loop

I want to get the main parent of chosen subcategory. I made function which recursively loop the databasse and it even get the ID but I can only echo it. I cannot return it into variable. I need to ...
0
votes
3answers
13 views

zip main folder with sub folder inside

I have a folder with some files and sub folder inside. How im going to read the directory and zip the main folder? Ex: maindirectory --- file 1 --- file 2 --- subdirectory 1 ------ file 3 ------ file ...
-3
votes
1answer
27 views

Recursion and Iteration method to locate missing brackets

For this assignment, the specification is simple. You are given a text file of arbitrary length (Possibly thousands of characters). To be considered correct, it must contain matching pairs of brackets ...
0
votes
1answer
20 views

recursively chmod files using RecursiveIteratorIterator

I'm trying to build a function that recursively set files or/and directories permissions of a given path, using both RecursiveDirectoryIterator and RecursiveIteratorIterator php classes. but things ...
0
votes
0answers
10 views

Need correction with bbcode decoder

I use this function to decode the bbcode to normal HTML what I wish to see on my site. But i have some issues. function code_to_html(text) { search = new Array( /\[b\](.*?)\[\/b\]/ig, ...
0
votes
1answer
36 views

C++ - WINAPI - Create menus recursively?

When trying to implement menus dynamically in a C++ application of mine without resource files with an interface like the one below, I ran into a problem: Menu menu_main__ = { Menu("File", { ...
1
vote
0answers
7 views

How to set permission mode for full tree when creating directory tree using install command?

When creating a directory tree in one shot like below, the directories dir1 and dir2 are getting the default owner/permissions(chmod) and only the end directory(ie; dir3) is created with the required ...
-1
votes
2answers
24 views

Recursive Git push/pull?

I have a git repository that contains other git repositories. Are there commands that recursively push and/or pull for not only the meta-repository but the sub-repositories?
1
vote
1answer
24 views

How to create a directory-like structure with meteor templates?

Consider this mockup of my intended output: The data structure behind this in a Mongo DB looks like this - I did not nest the subcategories inside the document because I still want to be able to ...
0
votes
2answers
66 views

Segmentation fault?

I've got at some code that should be recursively covering all positions on a boggle board. But for some reason it throws a segmentation fault after finding only 2 words? Any ideas why that would ...

1 2 3 4 5 507
15 30 50 per page