Skip to main content

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).

1 vote
1 answer
62 views

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 ...
coderodde's user avatar
  • 34.2k
6 votes
1 answer
269 views

(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. ...
coderodde's user avatar
  • 34.2k
5 votes
3 answers
700 views

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 ...
Ξένη Γήινος's user avatar
3 votes
6 answers
678 views

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 ...
Unknown's user avatar
  • 155
5 votes
4 answers
506 views

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 ...
Toby Speight's user avatar
  • 91.6k
2 votes
1 answer
220 views

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 ...
coderodde's user avatar
  • 34.2k
4 votes
2 answers
427 views

(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 ...
coderodde's user avatar
  • 34.2k
4 votes
3 answers
535 views

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 ...
coderodde's user avatar
  • 34.2k
6 votes
1 answer
581 views

(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, ...
coderodde's user avatar
  • 34.2k
2 votes
2 answers
129 views

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 ...
coderodde's user avatar
  • 34.2k
10 votes
3 answers
1k views

Intro This snippet is a translation of the Java version. Code string_util.hpp: ...
coderodde's user avatar
  • 34.2k
4 votes
1 answer
198 views

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 \$...
coderodde's user avatar
  • 34.2k
5 votes
2 answers
121 views

(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, ...
coderodde's user avatar
  • 34.2k
4 votes
1 answer
120 views

(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 ...
coderodde's user avatar
  • 34.2k
5 votes
1 answer
354 views

You can see it live here: https://flatassembler.github.io/multiplying-strings-aec.html ...
FlatAssembler's user avatar

15 30 50 per page