All submissions for this problem are available.
Exciting offer….!!! It’s World Cup time…. :) Here is an offer awaiting for you i.e… you will get a ticket to watch world cup finals @ Australia. Your task is so simple. You will be given a function . In order to win the prize, you need to reduce the time complexity of that function.
return fun(n-1) + fun(n-1);
Come on….!!! Hurry up. Solve it and get your ticket for #WC_Finals.
Single integer is given as input which is n value to be used as an argument for the function.
Return the output generated by the function for given n
- 1 ≤ n ≤ 100
Input: 2 Output: 4
|Time Limit:||0.1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions