알고리즘 공부를 해야지 해야지 하다가 이제서야 시작. 코딜리티(Codility)라는 좋은 사이트를 접하게 되어서 문제를 풀어보기로 마음먹었다. 코딜리티로 문제를 풀고나면 복잡도(Big-o)도 계산해주고 스코어도 매겨준다. 첫번째 문제. A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N.For example, number 9 has binary representation 1001 and contains a binary gap of length 2. The number 529..
알고리즘
2018. 3. 5. 23:47