Spoiler Alert

void main(){
   static int totem = 12345;
   int level = 0;
   int task = 45678;
   int returnTotem = dreamSequence(task);

   if (totem == returnTotem)
        printf("you are real");
   else{
       printf("Stuck in limbo");
       while(true);
   }
}

int dreamSequence(unsigned int number) {
     int totem = 12345;
     level++;
     int taskCompleted = 0;

    // Task Processing
   // Time Spent in function = f(t,level)

    if( taskCompleted)
         return totem;
     return dreamSequence(task);
}

Tags: ,

  • TH
    My take of plot summary in psuedo code ;)

    enterDream(inception) { inception = embed(inception); if(!inception.success() && !inception.wifeDead && inception.teamSize() > 1) {enterDream(inception);}}
  • Ruturajmd
    The totem in the dream and real life are same here in your program. I think they should be different, else they would beat the purpose. Only thing I can think of is a guard variable, like used in buffer over flow attacks, which might try to simulate the exact relevance of the totem. the probable implementation might in fact be tricky!
  • There should be a like button for posts :)
    +1
  • Kinnari Savani
    Veetrag, this one is superb!! Very much expected from an software engineer's mind. Yesterday, Nirav was discussing with one friend about 'recursion'(dream inside dream) and 'break'(kick) in this film :)
blog comments powered by Disqus