recursion large o


i've operative by new mechanism scholarship task involving recursion big-o notation. i trust i know graceful good (certainly perfectly, though!) nonetheless there doubt sole giving me many problems. rare thing looking it, looks many rudimentary homework.



provide best rate expansion controlling big-oh footnote fortitude following recurrence?



t(1) = 2



t(n) = 2t(n - 1) + 1 n>1



and choices are:




  • o(n record n)

  • o(n^2)

  • o(2^n)

  • o(n^n)



i know large o works an top bound, news many volume calculations, top controlling time, way slight take. i feel sole recursion should o(n), since, during most, recursion wholly occurs once any value n. given n isn't available, it's presumably improved that, o(nlogn), worse, being 3 options.



so, doubt is: since isn't o(n)?



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members