20260317

20260316

20260315

20260314

20260313

20260312

20260311

20260310

When you compile TypeScript, the output is plain JavaScript.

20260309

20260308

Negative feelings motivate me to do more LeetCode.

20260307

20260306

20260305

#include <cstdint>
#include <string>
#include <vector>

class Solution {
public:
    bool wordBreak(const std::string& s, const std::vector<std::string>& wordDict) {
        std::vector<uint8_t> possible(s.size() + 1);
        possible[0] = 1;
        for (size_t i = 0; i < s.size(); ++i) {
            for (const auto& word : wordDict) {
                if (i + word.size() > s.size()) { continue; }
                possible[i + word.size()] |= possible[i] && !s.compare(i, word.size(), word);
            }
        }

        return possible[s.size()];
    }
};

20260304

20260303

20260302

20260301


TODO:


index 202602 202604