3 ms·
Actually it turns out it's O(n). Which goes to show that constant factors can be more important than you think when looking at raw time complexity big-O.
by jameshart 4y ago
Actually it turns out it's O(n). Which goes to show that constant factors can be more important than you think when looking at raw time complexity big-O.
- nullc 4y agoEhhhh, it's O(n) when the string to be reversed is bounded under its input window. Because of self-attention it would grow quadratically for larger inputs, no?