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.
functionviralAdvertising(n:number):number{// Write your code hereconstcount=(days:number,likes:number=2,shares:number=6):number=>{likes+=Math.floor(shares/2);shares=Math.floor(shares/2)*3;days--;returndays>1?count(days,likes,shares):likes;}returncount(n);}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Viral Advertising
You are viewing a single comment's thread. Return to all comments →
TS