We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
cube=lambdax:x**3fromfunctoolsimportreducedeffibonacci(n):ifn==0:return[]elifn==1:return[0]# return a list of fibonacci numbersres=[0,1]returnreduce(lambdax,_:x+[x[-2]+x[-1]],range(n-2),res)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Map and Lambda Function
You are viewing a single comment's thread. Return to all comments →