If I rewrote an algorithm (small one 100-200 lines), written in some programming language and licensed under Apache 2, in another programming language, should the new code be considered as a derivative work or as a separate work?
And should the new code be licensed under Apache 2 or anything else?
Notice that APACHE2 says
For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.