This might seem like a good idea in principle, but you would have to be really careful about the wording of the assignment. If it just says "write a bubblesort", chances are I would, without asking any questions. That doesn't mean the idea would ever cross my mind in real code.