You are viewing a single comment's thread. Return to all comments →
C# Solution
public static int viralAdvertising(int n) { var likedByPeople = 2; var sharedWithPeople = 6; for(int i = 2; i <= n; i++) { likedByPeople += sharedWithPeople / 2; sharedWithPeople = (sharedWithPeople / 2) * 3; } return likedByPeople; }
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 →
C# Solution