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.

learn more… | top users | synonyms (2)

2
votes
0answers
58 views

What is the most efficient way of finding the first element of the ith row when A[i,j]=j*(A[i-1,j+1]-A[i-1,j])?

When the first row is 1, 1/2 , 1/3 .... Here's an image to support the question. Does there exist a more efficient approach than the naive O(n^2) approach? I came across this when studying ...
-2
votes
0answers
31 views

how to construct trees

I want to construct trees for the following sample data but don't know how to do it, please help. ManagerId WorkerId 0000 0001 0000 0002 0000 0003 0001 0004 0003 ...
0
votes
1answer
21 views

Inorganic growth of database

This is a kind of subjective question. For sites blocking different crawlers through robots.txt how do we expand the current database inorganically and legally(without bypassing the robots.txt file). ...
3
votes
4answers
138 views

How to create array of size greater than integer max

I was trying to get all primes before 600851475143. I was using Sieve of Eratosthenes for this. This requires me to create a boolean array of that huge size. Bad idea, you can run out of memory. Any ...
0
votes
0answers
22 views

Finding best matching for multiple variables without visiting all matches

The main problem: INPUT Values are floats representing distances measured during running time. X {x0, x1,...,x9} DATA Values are floats representing a pre computed list of distances. A {a0, ...
1
vote
2answers
28 views

Implement AES algorithm with CUDA

The most important problem of AES algorithm is its low speed. Is it possible to implement its algorithm with CUDA ? I know it's possible but I know how much can I improve it's speed ?
0
votes
1answer
36 views

Theoretical approach in active noise suppression

Hypothesis: I've 2 recording devices, microphone 1 is recording the sound I'm interested in and some noise, microphone 2 is recording only the noise. What's the basic approach for removing the noise ...
0
votes
1answer
46 views

How to transform one integer into two and to inverse the transformation easily?

I have a couple of integer (x,y) where 0 I need to store them into one column only, named z. I want to have the three functions F1, F2, F3 to solve this : z=F1(x,y) x=F2(z) y=F3(z) My first ...
-3
votes
3answers
103 views

how to combine all of these if statements into one if statement? android programming [closed]

im making an karaoke application but my problem is i cant sync the lyrics and rythm of the song... here is the if statement code... while(!isRunning) { while(Player.getInstance() != null) { ...
0
votes
1answer
102 views

A permutation of the integer numbers on which the algorithm runs forever

I have the following problem in my university: What is the minimum n that there is a permutation of the integer numbers from 0 to n - 1, on which the algorithm runs forever? #include ...
-2
votes
3answers
69 views

How to tell a Binary Tree is “Complete” [closed]

I'm not exactly sure what makes a tree complete but I need to figure out if my tree is complete or not, so what I'm doing is making sure that each part of the tree is balanced. If a tree is entirely ...
3
votes
2answers
54 views

What are elegant ways to pair characters in a string?

For example, if the initial string s is "0123456789", desired output would be an array ["01", "23", "45", "67", "89"]. Looking for elegant solutions in JavaScript. What I was thinking (very ...
0
votes
2answers
46 views

Is it possible to deal with individual bits in C#? Trying to implement a SHA256 generator

Just doing this for fun and I was reading the pseudo-code on Wikipedia and it says when pre-processing to append the bit '1' to the message and then append enough '0' bits to the resulting message ...
3
votes
0answers
39 views

Something wrong with my CYK code [closed]

I wrote some code implementing the CYK Algorithm. I have some problems with my code, but I don't know which I did wrong. I also asked about the pseudo-code of CYK Algorithm. Could you please help me ...
0
votes
0answers
44 views

Parallel Prefix Sum Algorithm

Below is a parallel prefix sum algorithm for j = 1 to log2(n) for all k in parallel do if k >= 2^j then x[k] = x[k-2^(j-1)] + x[k] The diagram should look like: ...

1 2 3 4 5 1926
15 30 50 per page