Did you check https://github.com/keegancsmith/nth? "It has a deterministic O(n) runtime..." Sounds better.