DEV Community

Discussion on: Tell me a stupid app idea and I'll make it

Collapse
 
ajinspiro profile image
Arun Kumar

i wonder how the big(o) would be for that

Thread Thread
 
wiseai profile image
Mahmoud Harmouch

Great question. Ok. Let's say that, hypothetically, and for the sake of the argument that the previous comment gives an additional iteration to reach the base case, which leads to the function being called recursively n+1 times before reaching its base case, which is, again hypothetically, a big fat O(n + 1), that is presumably often called a linear runtime function. And that, in its turn, will lead us to the following formula:

Complexity = length of the tree from root to virgin node * number of virgin nodes
Enter fullscreen mode Exit fullscreen mode

Let's assume now that, theoretically, this equation can dramatically help us understand how to calculate any time complexity, which begs the question: what would that even mean? Now let's state that this equation is valid for the sake of the argument, and let's run quantum experimentation on that basis. Based on SchrΓΆdinger's dog, which is a thought experiment that illustrates a paradox of quantum entanglement. And suppose you are not aware of that thought experiment. In that case, a hypothetical dog may be considered simultaneously both exist and not exist due to its fate being linked to a random subatomic event that may or may not occur. And after a relatively short amount of time, you would manage to figure out the time complexity of that equation. After running that experiment, I think you would agree with me.

Thread Thread
 
virejdasani profile image
Virej Dasani

I made a few of the app ideas πŸ‘‡
youtube.com/watch?v=ndmzLQPbg7s