{"id":20126215,"url":"https://github.com/vadim-geroim/collatz-sequence","last_synced_at":"2026-05-11T11:34:17.928Z","repository":{"id":118485090,"uuid":"220382196","full_name":"vadim-geroim/collatz-sequence","owner":"vadim-geroim","description":"Determining the Collatz sequence for a number.","archived":false,"fork":false,"pushed_at":"2019-11-08T04:06:42.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T08:12:32.192Z","etag":null,"topics":["algorithms","collatz-sequences","rspec","ruby"],"latest_commit_sha":null,"homepage":"","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/vadim-geroim.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":"2019-11-08T03:50:00.000Z","updated_at":"2019-11-14T16:20:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"34f38200-cfac-44e9-adff-7195c46af47e","html_url":"https://github.com/vadim-geroim/collatz-sequence","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vadim-geroim%2Fcollatz-sequence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vadim-geroim%2Fcollatz-sequence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vadim-geroim%2Fcollatz-sequence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vadim-geroim%2Fcollatz-sequence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vadim-geroim","download_url":"https://codeload.github.com/vadim-geroim/collatz-sequence/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241570923,"owners_count":19984002,"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":["algorithms","collatz-sequences","rspec","ruby"],"created_at":"2024-11-13T20:14:30.724Z","updated_at":"2026-05-11T11:34:17.871Z","avatar_url":"https://github.com/vadim-geroim.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Collatz Sequence\r\nSolution and Tests to the Columbia University\r\n\r\n## Project structure\r\n- `lib/collatz_sequence.rb`  - contains solution\r\n- `spec/collatz_sequence_spec.rb` - includes tests\r\n\r\n## Solution\r\n- The method `determine_collatz_sequence` accepts as an argument number n and returns and an array with a sequence.\r\n- The method `determine_collatz_sequence_print` accepts as an argument an array witha a sequence and prints it in a console.\r\n- The method `collect_all_collatz_sequences_length_for` accepts as an argument number n and returns an array of hashes where\r\nhash is a single key - value pair. Key is n - number and value is a length of the sequence.\r\n- The method `find_the_longest_sequence` accepts as an argument an array with hashes and returns an array with two elements. \r\nThe first element is a n - number and the second a length of the sequence.\r\n\r\n## Test execution\r\n- Run `bundle install`\r\n- Open terminal window\r\n- From the project directory run `rspec`\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvadim-geroim%2Fcollatz-sequence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvadim-geroim%2Fcollatz-sequence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvadim-geroim%2Fcollatz-sequence/lists"}