Showing how I solved the BinaryGap challenge on the Codility website, using C++. The method can be applied to other languages such as Java and JavaScript.
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.