Hacker News new | ask | show | jobs
by Blackthorn 1437 days ago
Assuming you're using a non-backtracking library, they should both be O(n).