Category: String

Find Lexicographically minimal string rotation

Lexicographically minimal string rotation or lexicographically least circular substring is the problem of finding the rotation of a string possessing the lowest lexicographical order of all such rotations.

Validate an IP address in C++

In this post, we will see how to validate an IP address (IPv4) in C++. A valid IPv4 address must be in the form of, where xxx is a number from 0-255.

Run Length Encoding (RLE) data compression algorithm

Run length encoding (RLE) is a very simple form of lossless data compression which runs on sequences having same value occurring many consecutive times and it encode the sequence to store only a single value and its count.