You are viewing a single comment's thread. Return to all comments →
public static int viralAdvertising(int n) { int totalLikes = 0; int shares = 5; for (int i = 1; i <= n; i++) { int likes = shares / 2; totalLikes += likes; shares = likes * 3; } return totalLikes; }
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 →