All Questions
Tagged with algorithms strings
46 questions
1
vote
1
answer
158
views
Data structure for grouping strings in a collection when they share common substrings [closed]
I am looking for a data structure and an algorithm to manage a dynamic collection of strings, but grouping strings that have a substring in common. I try to describe it through an example.
@Christophe:...
-3
votes
1
answer
252
views
How to find the shortest common superstring [closed]
Problem statement:
You are given an array of strings. Each element (string) of array is of size 2. You are supposed to find the length of shortest possible string such that every element of the array ...
1
vote
2
answers
340
views
(Algorithm) Maximum Binary String After Making Changes
I am given a binary string binary consisting of only 0's or 1's. There are two allowed operations (can be re-used any number of times):
Operation 1: If the number contains the substring "00",...
1
vote
3
answers
451
views
Algorithm – Number of strings containing every string of a given set a strings
I have a given set S of strings, and a length l, and I am looking for the number of strings of length l that contains every string of S. A naive approach would be to generate every string of length l (...
-4
votes
1
answer
59
views
Choose a most probable value from the list based on some text [closed]
Im looking for a good way to find a value from the given list based on a text.
Example:
This computer has 16GB ram and with the best processor in it. Case is made from aluminium.
And I have ...
1
vote
3
answers
1k
views
Comparing whether two very large text contents are different or not efficiently
I have a MySQL database with a column Body MEDIUMTEXT. Until now I used to only store the contents into it. There was no update option for the users of the application. Now, I wanted to add an update ...
0
votes
1
answer
521
views
A collision-free hash-like function for use in hash tables and other data structures?
A short introduction to the problem: I'm working with a small database where I have a table of strings (web URLs, to be precise) as pairs: hash|string. Another table references these strings by hash ...
0
votes
1
answer
668
views
Subdomain matching
I am working on a small plugin for a DNS server. I have a static list of domain (sometimes subdomains too) names:
gaming.xyz.com
facebook.com
mail.example.com
blog.example.com
I want to check if a ...
2
votes
3
answers
2k
views
Algorithm for optimizing text compression
I am looking for text compression algorithms (natural language compression, rather than compression of arbitrary binary data).
I have seen for example An Efficient Compression Code for Text ...
2
votes
1
answer
523
views
Data Structure for "Intuitive" Text Matching
I've noticed that text editors and such have a more-than-prefix/suffix-based pattern matching algorithm going on behind the scenes. And StackOverflow's tag matching algorithm does more than just ...
6
votes
2
answers
4k
views
Detecting plagiarism – what algorithm?
I'm currently writing a program to read a body of text and compare it to search-engine results (from searching for substrings of the given text), with the goal of detecting plagiarism in, for example, ...
7
votes
2
answers
282
views
Finding and counting equal substrings in a set of strings
I'm thinking about a way of finding similar parts in Strings. I have a set of strings of varying length i.e:
The quick brown fox jumps
fox force five
the bunny is much quicker than the fox
is
First, i ...
5
votes
2
answers
556
views
finding optimal token definitions for compression
I have a collection of strings which have a lot of common substrings,
and I'm trying to find a good way to define tokens to compress them.
For instance, if my strings are:
s1 = "String"
s2 = "Bool"
...
-1
votes
1
answer
1k
views
Find missing number in sequence in string [closed]
I have a string that contains numbers in sequence. There are no delimiters between numbers. I have to find missing number in that sequence. For example:
176517661768 is missing the number: 1767
...
0
votes
1
answer
1k
views
Algorithm to get all possible forms of a word with varying suffixes [closed]
I'm writing an application in javascript where given a word, I need to get all the possible versions of the word with the suffix being the difference between each form. For example:
"sponsor" should ...