Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [algorithm]

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.

3 votes
8 answers
1k views

Algorithm for finding characters in the same positions in a list of strings?

Suppose I have: Toby Tiny Tory Tily Is there an algorithm that can easily create a list of common characters in the same positions in all these strings? (in this case the common characters are 'T' ...
ilitirit's user avatar
  • 16.3k
1 vote
2 answers
239 views

A/B testing on a news site to improve relevance

If you were running a news site that created a list of 10 top news stories, and you wanted to make tweaks to your algorithm and see if people liked the new top story mix better, how would you approach ...
Caleb Elston's user avatar
8 votes
7 answers
2k views

Is there an algorithm that extracts meaningful tags of english text

I would like to extract a reduced collection of "meaningful" tags (10 max) out of an english text of any size. http://tagcrowd.com/ is quite interesting but the algorithm seems very basic (just word ...
sachaa's user avatar
  • 1,977
0 votes
5 answers
435 views

What is a good algorithm for deciding whether a passed in amount can be built additively from a set of numbers? [duplicate]

Possible Duplicate: Algorithm to find which numbers from a list of size n sum to another number What is a good algorithm for deciding whether a passed in amount can be built additively from a set ...
Stimy's user avatar
  • 1,511
3 votes
5 answers
5k views

How Do You Categorize Based On Text Content?

How does one automatically find categories for text based on content?
27 votes
5 answers
20k views

C# compare algorithms [closed]

Are there any open source algorithms in c# that solve the problem of creating a difference between two text files? It would be super cool if it had some way of highlighting what exact areas where ...
public static's user avatar
-4 votes
9 answers
2k views

What is a good non-recursive algorithm for deciding whether a passed in amount can be built additively from a set of numbers?

What is a non recursive algorithm for deciding whether a passed in amount can be built additively from a set of numbers. In my case I'm determining whether a certain currency amount (such as $40) can ...
Stimy's user avatar
  • 1,511
376 votes
37 answers
377k views

What's the best way to build a string of delimited items in Java?

While working in a Java app, I recently needed to assemble a comma-delimited list of values to pass to another web service without knowing how many elements there would be in advance. The best I could ...
13 votes
6 answers
3k views

Similarity between line strings

I have a number of tracks recorded by a GPS, which more formally can be described as a number of line strings. Now, some of the recorded tracks might be recordings of the same route, but because of ...
Liedman's user avatar
  • 10.2k
65 votes
11 answers
50k views

Is there an algorithm that tells the semantic similarity of two phrases

input: phrase 1, phrase 2 output: semantic similarity value (between 0 and 1), or the probability these two phrases are talking about the same thing
btw0's user avatar
  • 3,576
10 votes
4 answers
7k views

Synchronisation algorithms

Are there any good references for synchronisation algorithms? I'm interested in algorithms that synchronize the following kinds of data between multiple users: Calendars Documents Lists and outlines ...
Kristopher Johnson's user avatar
3 votes
5 answers
3k views

How do I convert a set of polygons into a bitmap

How do I take a set of polygons which contain arbitrary values and create a corresponding bitmap where each pixel contains the value of the polygon at that location? To put the question into context, ...
Nick Randell's user avatar
  • 18.2k
5 votes
7 answers
7k views

Algorithm to find a common multiplier to convert decimal numbers to whole numbers

I have an array of numbers that potentially have up to 8 decimal places and I need to find the smallest common number I can multiply them by so that they are all whole numbers. I need this so all the ...
Scott's user avatar
  • 4,143
15 votes
16 answers
8k views

Algorithm for joining e.g. an array of strings

I have wondered for some time, what a nice, clean solution for joining an array of strings might look like. Example: I have ["Alpha", "Beta", "Gamma"] and want to join the strings into one, separated ...
knuton's user avatar
  • 3,577
54 votes
11 answers
147k views

Algorithm/Data Structure Design Interview Questions [closed]

What are some simple algorithm or data structure related "white boarding" problems that you find effective during the candidate screening process? I have some simple ones that I use to validate ...

15 30 50 per page