This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var numberOfWays = function(s) { | |
/* | |
n0 => numnber of substring of 0 | |
n1 => numnber of substring of 1 | |
n01 => numnber of substring of 01 | |
n10 => numnber of substring of 10 | |
selection must be 101 or 010 | |
*/ | |
let [n0, n1, n01, n10, ans] = [0, 0, 0, 0, 0] | |
for (let i = 0; i < s.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.col-sm-4.left | |
.names | |
h2.chinesename 王茂己 | |
.engname Rock Wang | |
.pic | |
img(src="https://i.imgur.com/1zc2GcY.jpg?1", alt="") | |
hr | |
.contact |