{"id":17279522,"url":"https://github.com/reagentx/coin-counter","last_synced_at":"2026-06-23T18:31:21.999Z","repository":{"id":68633573,"uuid":"303870640","full_name":"ReagentX/coin-counter","owner":"ReagentX","description":"Coin counter code challenge","archived":false,"fork":false,"pushed_at":"2024-04-10T03:40:24.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T14:53:05.594Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/ReagentX.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":"2020-10-14T01:30:26.000Z","updated_at":"2024-04-10T03:40:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd2f0d41-62c5-48cc-ade7-9bb9600e815e","html_url":"https://github.com/ReagentX/coin-counter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ReagentX/coin-counter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReagentX%2Fcoin-counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReagentX%2Fcoin-counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReagentX%2Fcoin-counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReagentX%2Fcoin-counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReagentX","download_url":"https://codeload.github.com/ReagentX/coin-counter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReagentX%2Fcoin-counter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34702911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-15T09:17:53.626Z","updated_at":"2026-06-23T18:31:21.977Z","avatar_url":"https://github.com/ReagentX.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coin Counter\n\nGiven an MxN array of “boxes”, where each box contains some number of coins `C[i][j]`, you want to maximize the number of coins you can take.\n\nYou take coins by traversing row by row, taking all of the coins from ONE box in each row. However, any time you change the index of the box you take coins from, you must pay a “change fee” equal to `ABS(x - y)` where `x` and `y` are the previous and new row indices.\n\nWrite a function that can determine the optimal set of boxes to take coins from in order to maximize your profit after change fees.\n\n## Example\n\nThe matrix:\n\n    [\n        [5, 9, 2, 6, 4, 4, 9],\n        [4, 5, 7, 4, 6, 8, 8],\n        [8, 2, 9, 8, 8, 6, 5],\n        [2, 1, 1, 3, 5, 7, 1],\n        [1, 8, 1, 7, 1, 6, 8],\n    ]\n\nhas optimal path:\n\n    Values:  [9, 8, 8, 7, 8]\n    Indexes: [6, 6, 4, 5, 6]\n\n## Performance\n\nFor a 10,000x10,000 matrix, `cargo run --release` results in the following timing:\n\n    Grid generated in: 644.20ms\n    Solution found in: 148.04ms\n    169,976 coins\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freagentx%2Fcoin-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freagentx%2Fcoin-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freagentx%2Fcoin-counter/lists"}