Algorithm Study | Day 40/60: Word Break, Multiple Knapsack, and Knapsack Problem Summary
一、Problem Practice
1.1 Word Break
Problem Link: . - LeetCode
class Solution {
public:
bool existsInDict(const vector<string>& dictionary, const string& target) {
for (const auto& word : dictionary) {
if (word == target) return true;
}
return false;
}
bool wordBreak(string ...
Posted on Thu, 05 Nov 2026 16:07:17 +0000 by Fatboy