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)

0
votes
0answers
3 views

(.Net) Optimal data structure to find union of words between a sentence and dictionary

I am trying to find the most optimal way to compare words in a collection (hashset, list) to a document (like an essay, blog) for finding matching words. For example - I have the following ...
1
vote
1answer
22 views

Algorithm for finding empty cell around desired position in a grid

I will describe my problem using the attached image : The green block is the starting position of my game entity. Next I'd like to move it to the position marked by the orange square. But at the ...
0
votes
0answers
8 views

Ranking algorithms for nodes with subnodes?

I am working on a site where there are nodes that users can vote on (upvotes/downvotes). Each node has a list of subnodes. Users can vote on each of these subnodes as well. Think of the relationship ...
1
vote
2answers
26 views

Design an algortihm to match trajectory?

I have a dataset in the form of (timestamp, lattitude,longitude). I'm going to be given n entries where each entry is of the form of (timestamp,lattitude,longitude). This is for one user. ...
1
vote
2answers
48 views

How to combine two arrays into the one, alternating elements?

Suppose you have array arr[N] of increasing numbers. You have to divide it in two other (Left and Right): L = {0, 2, 4, 6, 8, 10, ...} R = {1, 3, 5, 7, 9, 11, ...} The following algorithm does ...
-2
votes
0answers
29 views

(Physical) Library Search Algorithm [closed]

Does anybody know what kind of algorithms libraries use when searching through their large amounts of books in "advanced search" mode? They often allow for boolean search parameters and allow you to ...
-4
votes
0answers
52 views

Matrix Pattern Recognition Algorithm [closed]

I have a picture that I elaborate with my program to obtain a list of coordinates. Represented in the image there is a matrix. In an ideal test i would get only the sixteen central points of each ...
2
votes
1answer
34 views

How to encode strings inside serial number using PHP?

I need to generate serial numbers using PHP in the following format "ASDK3-JDAL9-24SFT-J5D8R-D4AL9". One requirement is the fact that I need to encode somehow a timestamp and an email address inside ...
-7
votes
3answers
67 views

Javascript factorial [closed]

I need help with the following. The factorial of a non-negative integer n (denoted by n!) is the product of all positive integers less than or equal to n. n! = n * (n-1) * (n-2) * ... * 1 For ...
0
votes
1answer
39 views

Create python dictionary from value of another dictionary?

I am trying to efficiently construct a python dictionary from the keys' values of another dictionary. For example... dict1 = {'foo': [1, 3, 7], 'bar': [2, 4, 8]} ## note: all values in {key: ...
1
vote
0answers
23 views

Coordinate conversion from input for drawing in OpenGL

I am trying to do an off-axis projection in my application and trying to change the perspective of the scene as per the user's head position. Normally, given that I had to draw a box on the screen, I ...
1
vote
1answer
19 views

Drum sound recognition algorithms

I am thinking of trying to make program that will automatically generate drum tabs using an audio file containing only the drumming. I have thought of using FFT to get an average spectrum peaks ...
7
votes
2answers
115 views

Sorting 100 unique numbers by using 40bytes of memory

I've been asked a good programming problem: In the input I've got 100 unique numbers from 0-255(1 byte). I can only read one number at a time and only once. I've got 40 bytes of memory which I can ...
0
votes
2answers
37 views

Compare strings by matching words

I'd like to know if such an algorithm exists and is implemented in any database (ideally Postgres). Levenstein matches strings, but I'd like to compare strings based on the number of matching words. ...
0
votes
0answers
33 views

Finding all vertices on negative cycles

I know that the problem of checking whether given edge of a weighted digraph belongs to a negative cycle is NP-complete (Finding the minimal subgraph that contains all negative cycles) and ...

1 2 3 4 5 2001
15 30 50 per page