{"id":21432809,"url":"https://github.com/algerina/mob_programing_28_04","last_synced_at":"2025-03-16T22:36:33.201Z","repository":{"id":115927889,"uuid":"486638829","full_name":"algerina/mob_programing_28_04","owner":"algerina","description":"Mob-programing: Solving a problem from Hackerrank \"Viral advertising\" using Ruby","archived":false,"fork":false,"pushed_at":"2022-04-28T15:01:16.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T08:43:44.262Z","etag":null,"topics":["hackerrank","hackerrank-solutions","mob-programming","ruby"],"latest_commit_sha":null,"homepage":"https://www.hackerrank.com/challenges/strange-advertising/problem?isFullScreen=true","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/algerina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-28T14:57:23.000Z","updated_at":"2022-05-14T12:31:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"d1a9ff33-0a16-481f-9573-ef11e6e0cb9a","html_url":"https://github.com/algerina/mob_programing_28_04","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"microverseinc/readme-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algerina%2Fmob_programing_28_04","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algerina%2Fmob_programing_28_04/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algerina%2Fmob_programing_28_04/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algerina%2Fmob_programing_28_04/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/algerina","download_url":"https://codeload.github.com/algerina/mob_programing_28_04/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945480,"owners_count":20372890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hackerrank","hackerrank-solutions","mob-programming","ruby"],"created_at":"2024-11-22T23:20:52.947Z","updated_at":"2025-03-16T22:36:33.164Z","avatar_url":"https://github.com/algerina.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://img.shields.io/badge/Microverse-blueviolet)\n\n# Viral Advertising with Ruby\n\nHackerLand Enterprise is adopting a new viral advertising strategy. When they launch a new product, they advertise it to exactly  people on social media.\n\nOn the first day, half of those  people (i.e., ) like the advertisement and each shares it with  of their friends. At the beginning of the second day,  people receive the advertisement.\n\nEach day,  of the recipients like the advertisement and will share it with  friends on the following day. Assuming nobody receives the advertisement twice, determine how many people have liked the ad by the end of a given day, beginning with launch day as day .\n\nExample\n.\n\nDay Shared Liked Cumulative\n1      5     2       2\n2      6     3       5\n3      9     4       9\n4     12     6      15\n5     18     9      24\nThe progression is shown above. The cumulative number of likes on the  day is .\n\nFunction Description\n\nComplete the viralAdvertising function in the editor below.\n\nviralAdvertising has the following parameter(s):\n\nint n: the day number to report\nReturns\n\nint: the cumulative likes at that day\nInput Format\n\nA single integer, , the day number.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgerina%2Fmob_programing_28_04","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falgerina%2Fmob_programing_28_04","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgerina%2Fmob_programing_28_04/lists"}