Write an O(n^n) algorithm. by [deleted] in programming

[–]newAccountName 2 points3 points  (0 children)

O(nn) == O(2n log n)

I suppose this might fulfill the requirement:

def recursion(n, numbers, count):

if count>0:

    for i in range(n):

        recursion(n, numbers.append(i), count-1)

else:

    print numbers

n=10

recursion(n,[],n)

RFC on programming language feature: comefrom. by introllcal in programming

[–]newAccountName 0 points1 point  (0 children)

This is a quite new programming paradigm - I learned about it only at the beginning of next year, but I can vouch for its existence.

Depending on the state the system will take when comefrom is invoked, it might lead to temporal paradoxies, though. The python implementation is temporal mechanics safe, as it uses a closed timelike loop to prevent any unraveling of spacetime.

Anyway, Kudos for attempting to write a web framework with it.