What is the time complexity for the following function? (the basic operation is the innermost loop body's assignment).
function f(n)
r ← 0
m ← 1
for i ← 1 to n do
m ← 3 × m
for j ← 1 to m do
r ← r + j
return r
Multiple Choices:
Θ(n^3)
Θ(3^n)
Θ(n*log(n))
Θ(n)
Θ(n^2)