MCPcopy Create free account
hub / github.com/VanjaRo/LeetCode / expandAroundCenter

Function expandAroundCenter

tasks/5.go:31–37  ·  view source on GitHub ↗
(s string, L, R int)

Source from the content-addressed store, hash-verified

29}
30
31func expandAroundCenter(s string, L, R int) int {
32 for L >= 0 && R < len(s) && s[L] == s[R] {
33 L--
34 R++
35 }
36 return R - L - 1
37}

Callers 1

longestPalindromeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected