{"ScriptPreparationCode":null,"TestCases":[{"Name":"FIbonnaci Memo","Code":"function fibMemo(index, cache) {\r\n cache = cache || [];\r\n if (cache[index]) return cache[index];\r\n else {\r\n if (index \u003C 3) return 1;\r\n else {\r\n cache[index] = fibMemo(index - 1, cache) \u002B fibMemo(index - 2, cache);\r\n }\r\n }\r\n return cache[index];\r\n}\r\n \r\nfibMemo(1000);","IsDeferred":false},{"Name":"Fibonacci","Code":" function fibonacci(pos) {\r\n var a = [0,1]\r\n if (pos == 1) {\r\n return 1\r\n }\r\n var i = 1\r\n while (i \u003C pos) {\r\n a.push(a[i] \u002B a[i -1])\r\n i\u002B\u002B\r\n }\r\n return a.pop()\r\n}","IsDeferred":false}]}