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.
here is my solution ! very time efficient without using lists
defisFibo(n):# Write your code hereifn==0orn==1:return"IsFibo"i_th=0i2_th=1index=1whileindex<=n:ifi_th+i2_th==n:return"IsFibo"i_th=i2_thi2_th=indexindex=i_th+i2_thifindex==n:return"IsFibo"return"IsNotFibo"
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Is Fibo
You are viewing a single comment's thread. Return to all comments →
here is my solution ! very time efficient without using lists