Hoarding programming problems for you!

Looking for good programming challenges?

Use the search below to find our solutions for selected questions!

All posts tagged string

Boyer–Moore string search algorithm

The Boyer–Moore string search algorithm is an efficient string searching algorithm that is the standard benchmark for practical string search literature. For instance, GNU grep uses the Boyer-Moore algorithm. For a full explanation of the algorithm please refer to Wikipedia.

Aho-Corasick string search algorithm

The Aho–Corasick algorithm is a string searching algorithm invented by Alfred V. Aho and Margaret J. Corasick. For a full explanation of the algorithm please refer to Wikipedia.

Reverse words in string

Problem statement Given an input string, reverse the string word by word. For example, given s = “the sky is blue”, return “blue is sky the”. Solution algorithm Write a function reverse(string, start, end) that reverses string[start:end]. Reverse entire input string. Iterate over (reversed)words in reversed string and correct them . . . Read more