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.
Please find the optimized code which passes all case
//Complete the following function.intterm=3;intfind_nth_term(intn,inta,intb,intc){//Write your code here.// int result = c;if(term==n){returnc;}else{term++;return(find_nth_term(n,b,c,(a+b+c)));}}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Calculate the Nth term
You are viewing a single comment's thread. Return to all comments →
Please find the optimized code which passes all case