Skip to content

Instantly share code, notes, and snippets.

View Rock070's full-sized avatar

Rock070 Rock070

View GitHub Profile
@Rock070
Rock070 / 2222. Number of Ways to Select Buildings.js
Last active June 12, 2022 13:18
Leetcode with JS: 2222. Number of Ways to Select Buildings
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++) {
@Rock070
Rock070 / index.pug
Last active January 28, 2020 09:01
Project1.個人履歷
.col-sm-4.left
.names
h2.chinesename 王茂己
.engname Rock Wang
.pic
img(src="https://i.imgur.com/1zc2GcY.jpg?1", alt="")
hr
.contact