For my project I need to use same algorithm for both web and Android application.
I thought about handling the algorithm server side but I feel this would put too much unnecessary load on the server so I would prefer it to be handled client side.
What approach would be recommended for this situation to avoid both load on the server and rewriting the code?