[algorithm] (change:minor) Added cast to unsigned long