{"id":18775412,"url":"https://github.com/lalitmee/consecutive-zeroes","last_synced_at":"2026-05-01T06:33:45.804Z","repository":{"id":81597878,"uuid":"114151505","full_name":"lalitmee/Consecutive-Zeroes","owner":"lalitmee","description":"Program for number of binary strings without consecutive zeroes","archived":false,"fork":false,"pushed_at":"2017-12-13T18:42:07.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-21T03:13:05.581Z","etag":null,"topics":["binary-strings","coding-interviews","java","python3"],"latest_commit_sha":null,"homepage":"","language":"Java","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/lalitmee.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":"2017-12-13T17:48:43.000Z","updated_at":"2025-01-11T05:47:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"bc65c19c-a83f-4f2f-9f70-83cd79a2e763","html_url":"https://github.com/lalitmee/Consecutive-Zeroes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lalitmee/Consecutive-Zeroes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalitmee%2FConsecutive-Zeroes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalitmee%2FConsecutive-Zeroes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalitmee%2FConsecutive-Zeroes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalitmee%2FConsecutive-Zeroes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lalitmee","download_url":"https://codeload.github.com/lalitmee/Consecutive-Zeroes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalitmee%2FConsecutive-Zeroes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32487532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["binary-strings","coding-interviews","java","python3"],"created_at":"2024-11-07T19:41:32.703Z","updated_at":"2026-05-01T06:33:45.789Z","avatar_url":"https://github.com/lalitmee.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Consecutive Zeroes Problem\n==========================\n\n## Problem Statement: ##\n\nRecently Manu visited the byteland. He was amazed with lots of different varieties of bytes he\nencountered there. Seeing this, he thought of a problem: Given an integer n, find out total possible bit string (either 0 or 1) of length n which don't have two contiguous zeroes in them. For example if n = 3, then total possible bit strings are 5 {010, 011, 101, 110, 111}. Now Manu started solving the problem but got busy with some important deployments. He asked you for the help. Please help him figure out the solution.\n\n## Input Format: ##\n\nFirst line of test case contains an integer t denoting the number of test cases.\nIn next t lines, each line contains an integer n, denoting the length of bit string.\n\n## Output Format: ##\n\nFor t test cases, output the total number of bit string possible. Since this number can be very large, output it modulo 10^9+7.\n\n## Constraints: ##\n\n1 \u003c= t \u003c= 10^3 \u003cbr\u003e\n1 \u003c= n \u003c= 10^15\n\n## Input Example: ##\n\n2 \u003cbr\u003e\n2 \u003cbr\u003e\n3\n\n## Output Example: ##\n\n3 \u003cbr\u003e\n5\n\n## Explanation: ##\n\nFor first test case (n = 2), the total possible bit strings are {01,10,11}. So answer is 3.\nSecond test case is same as provided in problem statement.\n\n## Subtask 1 (40 points): ##\n\nt = 1 \u003cbr\u003e\n1 \u003c= n \u003c= 10^4\n\n## Subtask 2 (60 points): ##\n\noriginal constraints\n\n\n## Execution of Codes ##\n\n1. Java Code \u003cbr\u003e\n    ```shell   \n    javac ZeroBit.java \n    java ZeroBit\n    ```\n\n2. Python Code\n    ```shell\n    python3 ZeroBit.py\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flalitmee%2Fconsecutive-zeroes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flalitmee%2Fconsecutive-zeroes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flalitmee%2Fconsecutive-zeroes/lists"}