mah110020 / DeveloperChallenge

Captivation Software's developer programming challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Matt. H.

Captivation Software Developer Challenge

https://github.com/captivationsoftware/DeveloperChallenge/#captivation-software-developer-challenge

REQUIREMENTS

INSTALL node.js: I tested on v6.11.4, but any modern version should work.
This likely comes preinstalled on any Linux based OS.
HOW TO INSTALL: https://nodejs.org/en/download/

HOW TO RUN

The input can be piped: (should print "!")
	echo "010000110100000101010000010101000100100101010110010000010101010001001001010011110100111000100001" | node captivation_matt_h.js

Or the program can be run alone and will expect keyboard input:
	node captivation_matt_h.js

EXAMPLE INPUT/OUTPUT

  • EXAMPLE INPUT 1:

    "Hello CAPTIVATION!0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890Goodbye, everyone."

    "01001000011001010110110001101100011011110010000001000011010000010101000001010100010010010101011001000001010101000100100101001111010011100010000100110000001100010011001000110011001101000011010100110110001101110011100000111001001100000011000100110010001100110011010000110101001101100011011100111000001110010011000000110001001100100011001100110100001101010011011000110111001110000011100100110000001100010011001000110011001101000011010100110110001101110011100000111001001100000011000100110010001100110011010000110101001101100011011100111000001110010011000000110001001100100011001100110100001101010011011000110111001110000011100100110000001100010011001000110011001101000011010100110110001101110011100000111001001100000011000100110010001100110011010000110101001101100011011100111000001110010011000000110001001100100011001100110100001101010011011000110111001110000011100100110000010001110110111101101111011001000110001001111001011001010010110000100000011001010111011001100101011100100111100101101111011011100110010100101110"

  • EXAMPLE OUTPUT 1:

    "!0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890Goodbye,"

  • EXAMPLE INPUT 2:

    "Hello CAPTIVATION!CAPTIVATION!0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890Goodbye, everyone."

    "01001000011001010110110001101100011011110010000001000011010000010101000001010100010010010101011001000001010101000100100101001111010011100010000101000011010000010101000001010100010010010101011001000001010101000100100101001111010011100010000100110000001100010011001000110011001101000011010100110110001101110011100000111001001100000011000100110010001100110011010000110101001101100011011100111000001110010011000000110001001100100011001100110100001101010011011000110111001110000011100100110000001100010011001000110011001101000011010100110110001101110011100000111001001100000011000100110010001100110011010000110101001101100011011100111000001110010011000000110001001100100011001100110100001101010011011000110111001110000011100100110000001100010011001000110011001101000011010100110110001101110011100000111001001100000011000100110010001100110011010000110101001101100011011100111000001110010011000000110001001100100011001100110100001101010011011000110111001110000011100100110000010001110110111101101111011001000110001001111001011001010010110000100000011001010111011001100101011100100111100101101111011011100110010100101110"

  • EXAMPLE OUTPUT 2:

    "!CAPTIVATION!0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890Goodbye,"

  • EXAMPLE INPUT 3:

    "CAPTIVATION! They create software!"

    "01000011010000010101000001010100010010010101011001000001010101000100100101001111010011100010000100100000010101000110100001100101011110010010000001100011011100100110010101100001011101000110010100100000011100110110111101100110011101000111011101100001011100100110010100100001"

  • EXAMPLE OUTPUT 3:

    "! They create software!"

  • EXAMPLE INPUT 4:

    "CAPTIVATION"

    "0100001101000001010100000101010001001001010101100100000101010100010010010100111101001110"

  • EXAMPLE OUTPUT 4:

    ""

  • EXAMPLE INPUT 5:

    "<<14 garbage bits>>The company is CAPTIVATION, they create software!"

    "0101010001101001010100011010000110010100100000011000110110111101101101011100000110000101101110011110010010000001101001011100110010000001000011010000010101000001010100010010010101011001000001010101000100100101001111010011100010110000100000011101000110100001100101011110010010000001100011011100100110010101100001011101000110010100100000011100110110111101100110011101000111011101100001011100100110010100100001"

  • EXAMPLE OUTPUT 5:

    ", they create software!"

  • EXAMPLE INPUT 6:

    "<<14 garbage bits>>The company is CAPTIVATION,<<14 garbage bits>>, yes, CAPTIVATION!"

    "010101000110100101010001101000011001010010000001100011011011110110110101110000011000010110111001111001001000000110100101110011001000000100001101000001010100000101010001001001010101100100000101010100010010010100111101001110001011000101010001101000101100001000000111100101100101011100110010110000100000010000110100000101010000010101000100100101010110010000010101010001001001010011110100111000100001"

  • EXAMPLE OUTPUT 6: (? denotes some misaligned bit interpretation)

    ",???????????????????!"

About

Captivation Software's developer programming challenge


Languages

Language:JavaScript 100.0%