# algo_cpp **Repository Path**: wangfenghuan3399/algo_cpp ## Basic Information - **Project Name**: algo_cpp - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-21 - **Last Updated**: 2025-10-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Algo C++ Solutions This is an algorithm project written in C++, primarily solving the string segmentation problem. The project includes a solution class `Solution`, which implements the functionality to determine whether a string can be segmented into words from a given dictionary. ## Key Features - **String Segmentation Check**: Implements the `wordBreak` function to determine if a string can be segmented using words from a given dictionary. ## Project Structure - `word.cpp`: Contains the solution class and main function, used to implement and test the string segmentation functionality. ## Technologies Used - **Dynamic Programming**: Efficiently solves the string segmentation problem using a dynamic programming approach. - **Unordered Set**: Used to store dictionary words for efficient lookup. ## Example In the `main` function, the `wordBreak` function is tested with the input string `"leetcode"` and dictionary `{ "leet", "code" }`. The output result is `true`, indicating that the string can be segmented into dictionary words. ## How to Run 1. Ensure you have a C++ compiler installed. 2. Compile and run the `word.cpp` file using the command line: ```bash g++ word.cpp -o word ./word ``` 3. View the output in the console. ## Contributions Feel free to submit Issues and Pull Requests to improve this project.