neetcode-gh / leetcode

Leetcode solutions
MIT License
5.5k stars 2.27k forks source link

Fix: Incorrect when dealing with UTF-8 chars > 1 byte #3591

Closed WardLordRuby closed 1 month ago

WardLordRuby commented 1 month ago

Calling .len() on a String or &str in rust returns the byte length.

Also fixed the clippy lint.