MCPcopy Create free account
hub / github.com/LjyYano/LeetCode / isHappyOptimized

Method isHappyOptimized

src/main/java/L0202_HappyNumber.java:66–77  ·  view source on GitHub ↗

快慢指针解法(推荐) 类似于链表找环,使用快慢指针检测循环

(int n)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

mainMethod · 0.95

Calls 1

getNextMethod · 0.95

Tested by

no test coverage detected