Tagged Questions
4
votes
0answers
2k 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
198 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 ...
1
vote
0answers
31 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
158 views
Finding all paths using recursive method
I have a problem I am trying to do to practice, and I'm having trouble figuring out how to write a recursive algorithm for it. I have a file that is laid out like so:
4
(())
()((
(()(
))))
This ...
1
vote
0answers
169 views
Java double-recursive call.
I have an assignment that requires us to paint a tree of Pythagoras using recursion. The tree is started with the square ABCD and the points A and B are defined by mouse clicks. Everything seems to ...
1
vote
0answers
242 views
Writing a recursive method which returns the even indexes of an arraylist
I need to write a recursive method which returns the even indexes of an arraylist, with a predefined list of consecutive numbers [1, 2, 3, 4, 5, 6...].
The problem is that if I enter 10 numbers to ...
1
vote
0answers
211 views
Download files recursively from a directory present on unix server to local directory by ftp using Java code
I need to ftp files from a directory which has many sub-directories (and in turn each directory has many other directories and files in it) from Unix server to my local machine using Java.
I tried ...
1
vote
0answers
210 views
Big O complexity of recursive method
This is a java permutation of a bunch of numbers done recursively and I need to find out what the big O complexity of it is. Assumed it would be O(N^2) because of the nested loop, but a friend ...
1
vote
0answers
275 views
Calculating the value of a recursion formula in EXCEL using POI
I have an EXCEL Spreadsheet that has many computations some including recursive formula's (perfectly fine in excel which computes these with no problem).
I'm using version 3.8 of the Apache Poi API ...
1
vote
0answers
174 views
Recursively group a java 2D array?
I have a 2D array of my game's map. The array contains 1's or 0's.
A map could look like this, for instance:
11111111111
10000000001
10000011001
10000111001
10000011001
10000000001
11111111111
Is ...
1
vote
0answers
1k views
Decompress input text compressed using the RLE algorithm
I need help in decompressing an input text recursively which has been compressed using the RLE algorithm.
For some reason i am only getting the first character of the string as output nothing else. ...
0
votes
0answers
30 views
Jython exceeding recursion limit with Gson
I'm using Jython to make a Gson call to the method toJson(). I used a GsonBuilder to create the Gson object. The problem is that when calling the method, I get a 'RuntimeError: maximum recursion depth ...
0
votes
0answers
78 views
Some Problems With Path Finding
I'm trying to implement pathfinding in a game I'm programming using thismethod. I'm implementing it with recursion but some of the values after the immediate circle of tiles around the player are way ...
0
votes
0answers
61 views
How can I turn my code so that it finds all possible combinations of numbers
This is the code I have writen so far in order to find the unique combinations of the integers.
I recieve the number of the total integers and the length of the teams that will be created and I want ...
0
votes
0answers
58 views
How to create a recursive approach to showing all the teams that can be created from a group?
I have tried to create a program to be a able to create a group with all available team combinations of lets say 3 integers that I will get from the group arraylist. So far I have come to this state
...