MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / getCode

Function getCode

javascript/0763-partition-labels.js:51–51  ·  view source on GitHub ↗
(char)

Source from the content-addressed store, hash-verified

49};
50
51const getCode = (char) => char.charCodeAt(0) - 'a'.charCodeAt(0);
52
53const getAns = (S, lastSeen, left = 0, right = 0, labels = []) => {
54 for (const index in S) {

Callers 2

getLastFunction · 0.70
getAnsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected