KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there any real Algorithm with a time complexity O(n^n), that isn't just a gimmick? I can create such an Algorithm, like computing n^n in O(n^n) / Θ(n^n): long n_to_the_power_of_m(int n, int m) { if(m == 0) return 1; long sum = 0; for(int i = 0; i < n; ++i) sum += n_to_the_power_of_m(n, m-1); return sum; } (needs more than 4 minutes to compute 10^10) Or other way around: Are there any Problems, which cannot be solved better than in O(n^n)?
Tags (comma-separated)
Save Edits
Cancel