are mathematics (of which algorythms are a small part) discovered or created ? No one has a clear answer to that question.
Really? Maybe it's because the answer is so simple, no one serious has bothered tackling it.
Mathematics is a language. As such, it is created.
The things that mathematics describes are where it gets interesting. Much like in other languages, you have tangible things (easily verified as existing independent of the language), intangible things (dreams, emotions, forces) that are generally accepted as existing independent of language. And then you have two classes of things that are not entirely independent.
You have categories or groups. "Animal" is not an intangible thing, because it doesn't describe anything that actually exists, it is a term for a collection of things that exist. The term itself is semantics, but most categories have an objective component that exists independent of language.
The final category is pure language constructs. Rhymes, sentences, grammar, poems, etc. - while you can argue that they are linked to some biological or neurological element of human nature, a rhyme or a poem is very much a language construct and does neither describe a thing nor a group of things, it's a self-referential language construct.
And if you look closely, you find the same in mathematics.