I am sort of told that O(c^n) complexity could be the case of string permutations. but what is this specific 5^n? can anyone think of a simple algorithm with O(5^n)?thx
wobuaini
0
Newbie Poster
Recommended Answers
Jump to PostWhen time complexity is that way, it is usually related to recursive function (easier to explain). I do not have 5^n example but I have 2^n which is similar (constant^n).
Check the fibonaci function time complexity. It has
base case:
n = 1
assume:
T(n-1) = O(2n-1), therefore
T(n) …
All 4 Replies
wobuaini
0
Newbie Poster
Taywin
312
Posting Virtuoso
wobuaini
0
Newbie Poster
Taywin
312
Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.