ChallengeRocket
  • Challenges
  • Find jobs
  • Candidate Hub
  • Employers / Post a Job
  • Log in
  • Sign up now
Menu
  • Home
  • Challenges
  • Complementing Binary Numbers

Complementing Binary Numbers

Complementing Binary Numbers

Before you start the test, check out our tutorial challenge

Before you start the test, check out our tutorial challenge

~25MIN
Start: Oct 19, 2019
CODE CHALLENGE
  • Challenge outline
  • Tips
  • Leaderboard
Complementing Binary Numbers
  • Challenge outline
  • Tips
  • Leaderboard

Challenge overview

Hello and welcome to the challenge!


Write a code which receives a string with characters 0, 1 and ? and returns all possibilities of replacing ? characters with 0 or 1.

Example

  • solve('0?1') -> ['011', '001']

Input

  • a string with characters 0, 1 and ?

Output

  • an array concaining all possible ways of complementing the given string

Constraints

  • 0 < length of the given string < 100
  • 0 < amount of ? characters in the given string < 10


You can solve this programming contest in Ruby, JavaScript, Python and many other languages. If you want, you can also take part in other October 2019 competitions. Below you can find some of them:


  • Numbers And Strings
  • Bigger Number With The Same Digits
  • Passwords From Sentences


Have fun and good luck! :)

By using our site, you agree to challengerocket's use of cookies in accordance with our privacy policy.
ChallengeRocket
Tech talent
Challenges Blog Find jobs Candidate Hub
Companies
Business HR Blog Pricing
Challengerocket
FAQ EU Join Us Contact Us
We connect Top Tech Talent with Companies. We are community of software developers, engineers, data scientists and tech lovers.
Copyright © 2021 ChallengeRocket. All rights reserved.
Privacy Terms and Conditions Service status

Sign in

Don’t have account?
Create a new account
or

Forgot your password?

Log in

Forgot your password?

Don’t have an account?  Sign up free

Create a new account

Already have an account?
Log in
or
  • At least 8 characters
  • Uppercase Latin characters
  • Lowercase Latin characters
  • At least one number or symbol

Reset your password

Have an account? Log in Log in for business

Create New Account

Sign up for free.
Select the best plan to publish job ads & challenges.

Company name introduced here will be visible on your job ads.
  • At least 8 characters
  • Uppercase Latin characters
  • Lowercase Latin characters
  • At least one number or symbol

Not an employer?  Sign up as a candidate