>  The complexity is ...

Ignore that, I simply meant to highlight what I'll need to change, but just do it I can easily adapt the other code to this.