You are viewing a single comment's thread. Return to all comments →
Javascript solution:
// Write your code here let likes = 2 let cum = [2] for(let i =1; i<n; i++){ likes += Math.floor(likes/2) cum.push(likes) } return cum.reduce((a,b) => a+b)
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 →
Javascript solution: