LLMs are not based on brute force algorithms. They are based on finding the best string of tokens (for text based LLMs) that would correspond to a prompt.
To illustrate that you can see how DeepSeek "thinks". There are lots of "Given the instructions, if we", "Alternatively, we can ", "Also, if ", "wait", "but" etc...