The analog algorithm described is not described for digital computer. It’s an amusing theoretical thought experiment and not a recipe for actual fast sorting. It’s O(n) when you use your hand for contact and removal. I don’t know if it’s possible to implement spaghetti sort on a computer, maybe not, but I guess if it were possible, it would probably at least require n processors to sort n elements. Maybe the nearest analogy on digital computers is radix sort.