If it is trivial, authorship is not an issue.
If on the other hand you developed a method that is not trivial, you should implement it yourself. Designing a non-trivial algorithm in your head without missing something is rare. If you don't implement it yourself, your student will have refined and corrected your method, and would be a co-author. It would then be unethical to claim sole authorship.
EDIT: It would then be unethical to claim sole authorship. However it would not be unethical to claim first authorship in my view.