LeetCode 14 – Python 3 (Week 05 – 06)

There are many ways to compare strings in strs. I just used vertical scanning and horizontal scanning, because I think the other methods are more complexity and harder to understand. Both solution 1 and solution 2 are vertical scanning. I found solution 2 online. “while true”, “try”, and “except” are use in solution 2. Solution …

Design a site like this with WordPress.com
Get started