摘要:
Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You... 阅读全文
摘要:
From each pointer, spread to the board. One tricky is set the char that used to be 0. Set it back when finished searching. 1 class Solution { 2 privat... 阅读全文
摘要:
Do the BFS and use a hashset to record whether the word has been found before. 1 class Solution { 2 public: 3 int ladderLength(string start, strin... 阅读全文