• This code is very difficult to understand - there are no supporting comments and a lot of variables named as single letters.

    Some documentation of how it works would be useful!