Re:LINQ Ruined My Favorite Interview Question
by kyllo on Friday July 12, 2013 @09:56AM
(#6032574)
Oh, you're right, m is not a constant but also varies somewhat independently of n, so you can't exclude it from the big O notation. And whether mn or nlogn is the lower order of the two terms depends highly on the value of m, which is the number of unique words in the text. A really long text that's just the same word over and over will have a big n but a small m.
[ Parent
| on HN ]