An algorithm is a sequence of well-defined steps that defines an abstract solution to a problem. Use this tag when your issue is related to algorithm design.
0
votes
0answers
8 views
d3.js Get unlimited data
I'am coming to ask a question because I've no idea how to do this.
Basicly, I'm working with a D3.js line chart and I get the data with this code :
// Get the data
d3.tsv("data2.tsv", ...
0
votes
2answers
22 views
Get path and value of all elements in nested associative array
Consider an associative array of arbitrary form and nesting depth, for example:
$someVar = array(
'name' => 'Dotan',
'age' => 35,
'children' => array(
0 => ...
0
votes
1answer
7 views
Smooth radial gradient
So, I'm trying to create a radial gradient (for static lighting in a game). I came up with this:
int step = 4;
int forLen = (radius / step);
g.setColor(new Color(0, 0, 0, intensity));
for (int i = 0; ...
0
votes
1answer
69 views
C++ Adding big numbers together with operator overload
I am new to C++ and attempting to create a "BigInt" class. I decided to base most of the implementation on reading the numbers into vectors.
So far I have only written the copy constructor for an ...
1
vote
5answers
64 views
Generate all combinations from multiple lists
Given an unknown amount of lists, each with an unknown length, I need to generate a singular list with all possible unique combinations.
For example, given the following lists:
X: [A, B, C]
Y: [W, ...
0
votes
2answers
15 views
Finding a simple shape within a 3D point cloud
What is the most efficient way to find a shape that is defined by 5 rigid, coplanar, non-collinear points within a point cloud of, for example, 100 3D points?
2
votes
2answers
41 views
k-NN search in HUGE dimensions (~100,000)
Are there any articles about k-NN search problem for really huge amount of dimensions like 10k - 100k?
Most of articles with tests on real-world data operates with 10-50 dims, and a few operates ...
-1
votes
2answers
26 views
List of comparisons of Merge-Sort recursive alghoritm [closed]
Is there way to write down a list of comparisons of Merge-Sort recursive alghoritm (on a given input) without run it?
I will have an exam where there will be asked something like that, and I couldn't ...
0
votes
0answers
44 views
Add a property in EventArgs for extended class
I have a program for which I wrote a class that is used to fire events on dragging. The class is common for some elements in my case, hence the CommonDrag class. The code goes something like the ...
0
votes
3answers
45 views
Find a random number generator using a given random number generating function
This is an interview question:
Given a function which generates a random number in [1,5],we need to use this function to generate a random number in the range [1,9].
I thought about it a lot but am ...
0
votes
0answers
21 views
Sort resource access schedule for multiple threads so the number of writing conflicts gets minimized
Scenario:
Given a set of resources R:
Given a set of threads T, which will run in parallel:
Each thread needs to access a list of n resources. Each list is a sample of R, meaning that each ...
2
votes
3answers
89 views
Maintaining a top 100 list in memory
I'm making a live statistics system, that would maintain a list of most frequently accessed URL path (path only, parameters are stripped) in memory.
I've considered "max heap", but given that the URI ...
0
votes
1answer
16 views
PartitionProblem - find the optimal subsets
I need to find the optimal subsets after solving the partition problem using the Dynamic Programming pseudo polynomial time algorithm.
More specifically, I'm not able to make sense of this answer: ...
0
votes
0answers
19 views
Practically solving factorial-complexity problems ( scheduler )
Given i have this O(n!) scheduler-problem:
There are 10 Tasks with different durations, that I want to schedule during a workweek of 5 days
Each day has 8 workhours, seperated in 15min. slots ( 1 ...
-2
votes
0answers
23 views
Text fitting algorithm [closed]
Have a look at this map. How are the texts' size, orientation, line break determined to fit it an irregular boundary?
I intend to make a d3 visualization with map and labels similar to the one in the ...