Trong video này, mình sẽ giải thích bài toán LeetCode 127 - Word Ladder từng bước một.
Chúng ta sẽ hiểu cách biến bài toán từ các từ thành một đồ thị, tại sao cần dùng BFS để tìm đường đi ngắn nhất, và cách tối ưu việc tìm các từ kề nhau để tránh bị TLE.
Problem Link: https://leetcode.com/problems/word-ladder/description/
Timestamps:
0:00 Đọc vấn đề
02:58 Vẽ và giải thích
10:51 Coding
Follow me:
TikTok: https://www.tiktok.com/@UC7vG9CnA9qwDAN2ffJszqsQ
Instagram: https://www.instagram.com/nqhcode/
Facebook: https://www.facebook.com/profile.php?id=61565324466596
LinkedIn: https://www.linkedin.com/in/huong-nguyen-quoc-7a5992382/
#leetcode #python #bfs #graph #wordladder #codinginterview