Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/neetcode-gh/leetcode
/ getCode
Function
getCode
javascript/0271-encode-and-decode-strings.js:100–100 ·
view source on GitHub ↗
(str)
Source
from the content-addressed store, hash-verified
98
};
99
100
const
getCode = (str) => str.length.toString(2).padStart(8,
'0'
);
101
102
/**
103
* Chunk Transfer Encoding
Callers
1
encode
Function · 0.70
Calls
1
toString
Method · 0.45
Tested by
no test coverage detected