Questions tagged [string-processing]
Use this tag when the presented code focuses on string manipulations (such as concatenation, splitting, and extracting parts of a string) or on analyzing and manipulating the contents of strings (e.g., searching, matching against a pattern, and encoding / decoding).
33 questions
1
vote
1
answer
62
views
Comparing Hopcroft's and Moore's DFA minimization algorithms in Java
Prior attempts
This post extends my previous topic:
Deterministic finite automaton in Java
Deterministic finite automaton in Java - Take II
This time, I have added two DFA minimization algorithms to ...
6
votes
1
answer
269
views
Deterministic finite automaton in Java - Take II
(This is the continuation of Deterministic finite automaton in Java.)
(The repository is here.)
This time I have reworked the API and supplied a union DFA construction algorithm for additional fun.
...
5
votes
3
answers
700
views
English and Roman numeral converter in Python
I wrote this program over half a year ago, but I decided to not share it because the task seems trivial to me. Today I decided to post it here. As it is designed to work with strings and messiness of ...
3
votes
6
answers
678
views
Substitution cipher function that encrypts and decrypts text based on password using sha3-512, taking string and outputting string on both directions
22/12/2025
This is the almost final version of my encryption/decryption function that I started to make two weeks ago.
The first version was actually an big giant error, but with the received answers ...
5
votes
4
answers
506
views
Substitute patterns with values from lists
I was looking at a Stack Overflow question and got somewhat carried away with improving the solution, well beyond the scope of that question.
In summary, we have a string such as
...
2
votes
1
answer
220
views
Huffman code builder in Java - computing prefix codes for arbitrary (generic) alphabets - Take II
Intro
(This is the continuation of HuffmannEncoder.java - computing prefix codes for arbitrary (generic) alphabets.)
(See the GitHub repository.)
This time:
I have fixed the misspelled ...
4
votes
2
answers
427
views
HuffmannEncoder.java - computing prefix codes for arbitrary (generic) alphabets
(See the continuation of this post at HuffmanEncoder.java - computing prefix codes for arbitrary (generic) alphabets - Take II.)
I have this Java implementation of the Huffmann encoding. It looks like ...
4
votes
3
answers
535
views
A simple method for compressing white space in text (Java) - Take II
Intro
In this post, I will elaborate on A simple method for compressing white space in text (Java). Here, I have incorporated some advice offered by Chris. Also, this version preserves a single new ...
6
votes
1
answer
581
views
A simple method for compressing white space in text (Java)
(The story continues in A simple method for compressing white space in text (Java) - Take II.)
Intro
Now I have that text space compressor. For example,
...
2
votes
2
answers
129
views
Checking for weak string isomorphism in Java
Intro
I call two \$n\$-strings \$s\$ and \$z\$ over the alphabet \$\Sigma\$ weakly isomorphic if their character frequency multisets are equal. In other words, for an input strings \$s\$, we derive a ...
10
votes
3
answers
1k
views
Checking for string isomorphism in C++
Intro
This snippet is a translation of the Java version.
Code
string_util.hpp:
...
4
votes
1
answer
198
views
Checking for string isomorphism in Java
Intro
Two \$n\$-strings \$s = \langle s_1 \ldots s_n \rangle \$ and \$z = \langle z_z \ldots z_n \rangle\$ are considered isomorphic if and only if there exists a bijection \$f\$ such that for all \$...
5
votes
2
answers
121
views
Funny time with DNA: a \$k\$-mer index data structure in Java, Take II
(See the previous and initial iteration.)
Intro
This time, I decided to pack the genomic data such that 4 nucleotide bases are encoded into a single byte. In other words, ...
4
votes
1
answer
120
views
Funny time with DNA: a \$k\$-mer index data structure in Java
(See the next iteration.)
This time I have programmed a simple data structure called \$k\$-mer index. The actual word \$k\$-mer is a synonym of substring of length \$k\$. This data structure is built ...
5
votes
1
answer
354
views
Multiplying two large numbers whose digits you have in a string, in AEC compiled to WebAssembly
You can see it live here: https://flatassembler.github.io/multiplying-strings-aec.html
...