How to publish algorithm I have a new algorithm which I would like to publish.

I'm not a student, so I wanted to know a few things:
1) What should I publish? Just the algorithm with explanation? an academic paper? What are the principals of writing such one?
2) Where to publish?
3) What are the outcomes of publishing the algorithm? Legally or any other aspects I should be aware of.

Any other tips and helpful things I should know will be welcomed
Making an algorithm public is easy: you can put it on your webpage. By having it published as an academic paper (either conference or journal), you can  get reviews, which is interesting. Reviewers may help you evaluate the novelty of your approach. I thus suggest a paper, with at least:


a motivation for your algorithm,
a review of the related approaches and the explanation for its novelty,
the algorithm with explanations.


It is always a plus if you implement it also in a common computer language, so that others can check its efficiency, find bugs, allow improved versions. A working version of your algorithm in the shape of a code (compilable with instructions) can be put on GitHub for instance, for better versioning.

There are several algorithm related journals and conferences, for instance at the ACM Society:


ACM Transactions on Mathematical Software
ACM Transactions on Algorithms


and you can easily find many more, depending on the subfield your algorithm belong (combinatorics, optimization, real-time computing, etc.). Some are listed at the List of computer science conferences: Algorithms and theory.