> For the complete documentation index, see [llms.txt](https://851958789.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://851958789.gitbook.io/notes/0202_happy_number/slt.md).

# 思路1 快慢

首先digitSquareSum只有两种可能，要么最后循环重复，要么最后等于1.

快乐数必定会收敛到1,1必须是收敛的，因为1的平方还是1，若生成的一组数中有两个重合（非1）的，那么就会构成一种循环

参考英文网站热评第一。这题可以用快慢指针的思想去做，有点类似于检测是否为环形链表那道题 如果给定的数字最后会一直循环重复，那么快的指针（值）一定会追上慢的指针（值），也就是 两者一定会相等。如果没有循环重复，那么最后快慢指针也会相等，且都等于1
