99%. LLM cannot do a bubble sort on its own — that's one of the main modes of failure actually, when LLM fails to recognize algorithm and writes its own implementation. LLM is basically recognizing, concatenating known algorithms, renaming variables, functions names, interpolating multiple similar solutions into one target solution — with a success rate corresponding to the number of solutions it saw for this task.
In case you would say "but LLM-s learn on random source code from the internet" — not anymore, modern LLM-s are trained on highly curated, preprocessed, and some synthetic datasets. As I've said — the copying is indirect.
In case you would say "but LLM-s learn on random source code from the internet" — not anymore, modern LLM-s are trained on highly curated, preprocessed, and some synthetic datasets. As I've said — the copying is indirect.