Glassdoor interview question

String to binary algorithm.