Allegis Group Interview Question

Gray code conversion