Samsung Galaxy A5 is selling very well in developing nations as it sports a removable battery and premium looks. But instructions on how to root are not available, so we have made them available on galaxy-phone.net
1) Go to settings and Enable USB debugging in developer settings.
2) Download the KingRoot 4.0 apk in the official site and install it. (http://kingroot.net/root/ )
3) Connect you Samsung Galaxy A5 to the Internet and open the Kingroot app. Now click on the blue button and wait until completes.
4) That is it. You have successfully rooted the Galaxy A5.
Your warranty is also not void as the Knox is 0×0 which means warranty is valid.