{"id":23272350,"url":"https://github.com/letsdeepchat/remove-zeroes","last_synced_at":"2026-02-03T01:01:28.168Z","repository":{"id":153852889,"uuid":"432175639","full_name":"letsdeepchat/Remove-Zeroes","owner":"letsdeepchat","description":"Remove Zeroes using Java","archived":false,"fork":false,"pushed_at":"2021-11-26T12:45:58.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T15:40:55.792Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/letsdeepchat.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":"2021-11-26T12:44:30.000Z","updated_at":"2021-11-26T12:46:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"767eae73-3b95-4753-a5ce-c2a4434ad324","html_url":"https://github.com/letsdeepchat/Remove-Zeroes","commit_stats":null,"previous_names":["letsdeepchat/remove-zeroes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsdeepchat%2FRemove-Zeroes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsdeepchat%2FRemove-Zeroes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsdeepchat%2FRemove-Zeroes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsdeepchat%2FRemove-Zeroes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/letsdeepchat","download_url":"https://codeload.github.com/letsdeepchat/Remove-Zeroes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247463933,"owners_count":20942950,"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":[],"created_at":"2024-12-19T19:14:51.872Z","updated_at":"2026-02-03T01:01:23.146Z","avatar_url":"https://github.com/letsdeepchat.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Remove-Zeroes\nRemove Zeroes using Java\n\nYou are given a string s. Each character is either 0 or 1.\n\nYou want all 1s in the string to form a contiguous subsegment. For example, if the string is 0, 1, 00111 or 01111100, then all ones (1) form a contiguous subsegment, and if the string is 0101, 100001 or 11111111111101, then this condition is not met.\n\nYou may erase some (possibly none) zeroes(0) from the string. What is the minimum number of zeros (0) that you have to erase?\n\nInput\nThe first line contains one integer t (1≤t≤100) — the number of test cases.\n\nThen t lines follow, each representing a test case. Each line contains one string s (1≤|s|≤100); each character of s is either 0 or 1.\n\nOutput\nPrint t integers, where the i-th integer is the answer to the i-th testcase (the minimum number of zeros(0) that you have to erase from s).\n\nExample\nInput\n3\n\n010011\n\n0\n\n1111000\n\nOutput\n2\n\n0\n\n0\n\nNote\nIn the first test case you have to delete the third and forth symbols from string 010011 (it turns into 0111).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsdeepchat%2Fremove-zeroes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletsdeepchat%2Fremove-zeroes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsdeepchat%2Fremove-zeroes/lists"}