MCPcopy Create free account
hub / github.com/careercup/CtCI-6th-Edition-JavaScript / leftShift

Function leftShift

chapter08/8.12 - Eight Queens/nQueens.js:34–36  ·  view source on GitHub ↗
(binaryString, n)

Source from the content-addressed store, hash-verified

32};
33
34var leftShift = function(binaryString, n) {
35 return bitwiseOp(binaryString, n, (number) => number << 1);
36};
37
38var rightShift = function(binaryString, n) {
39 return bitwiseOp(binaryString, n, (number) => number >>> 1);

Callers 2

recurseFunction · 0.85
nQueens.jsFile · 0.85

Calls 1

bitwiseOpFunction · 0.85

Tested by

no test coverage detected