Efficient Solutions for Word Search II Problem

Given an m x n board of characters and a list of strings words, return all words on the board. Each word must be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once in a word. 1. Trie with DFS Build a trie from the given wor ...

Posted on Thu, 07 May 2026 19:06:04 +0000 by Lassie

Backtracking Problems: Combination Sum and Palindrome Partitioning

39. Combination Sum The key insight for this problem is understanding how elements can be reused during the search process. When recursively exploring combinations, each element can be selected multiple times since we continue searching from the current index rather than moving to the next one. Consider the tree structure: after selecting an el ...

Posted on Thu, 07 May 2026 06:45:14 +0000 by rachelk