How is Motoko's List.last function running in O(1)?

It has to check every element starting at the head, so why not O(n)?

1 Like

Sorry, that’s a typo. You are correct

1 Like