Motivation: When we talk about efficiency of an algorithm, we generally refer to the resources (time, space etc.) that the algorithm will consume for a given input. Especially, we usually are interested in how an algorithm will behave (as in how much time or space will be consumed) for voluminous input size. A solution to predict the behaviour (say…
Month: October 2016
Algorithm to find the Least Lexicographic Rotation of a circular string
Background: A string is a sequence of symbols from a set called an alphabet. If the string is circular, one can start reading it from any position/index. For example, consider the following circular string of length 8: If we read this circular string starting at 12 o’clock position and moving in clockwise direction, we obtain”abaabbab“….