Word Ladder – Python 3 (Week 14 – 03)

Solution 1 分层 Time O(n*l + l^2). Space O(n*l). n is total number of words. l is the max length of word. Solution 2 不分层 Time O(n*l + l^2). Space O(n*l). n is total number of words. l is the max length of word. Solution 3 Bidirectional Breadth First Search Time O(n*l + l^2). Space …

Create your own website, free on WordPress.com.Create your own website.
Start free