jseremba / binary-gap-solution-javascript Goto Github PK View Code? Open in Web Editor NEW 6.0 6.0 2.0 1 KB 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. JavaScript 100.00% Introduction ยท People ยท Discuss
This solution wont work for number 32 (100000) This solution is fine but, it need a little fix since it won't work for some of the numbers like 32
Purpose of line for (startIndexFromEnd; startIndexFromEnd >= 0; startIndexFromEnd--) { if (binStr.charAt(startIndexFromEnd) != '0') { break; } } Please what is the purpose of the above line?
Vue.js ๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
javascript JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Machine learning Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Facebook We are working to build community through open source technology. NB: members must have two-factor auth.