The most known method of rooting is using CF AutoRoot. Access the website, then scroll down and download the package available for your phone. Extract it and you should have CF-Auto-Root-klte-kltexx-smg900f.tar.md5 file and Odin 3. Install Kies to make the phone recognized by the computer. Kies also installs the necessary drivers. This will allow Odin to see the phone.
Start Odin, connect the phone in Download mode (Volume Down + Power) and click on PDA. Select the MD5 file and Start. Leave everything as it is. Use the image below for guidance.

