score:1
Yes, you can apply for a UK visitor visa while visiting another country. Section 28 of the Immigration Rules https://www.gov.uk/guidance/immigration-rules/immigration-rules-part-1-leave-to-enter-or-stay-in-the-uk states:
“ 28. An applicant for an entry clearance must be outside the United Kingdom and Islands at the time of the application. An application for an entry clearance as a visitor or as a short-term student must be made to any post designated by the Secretary of State to accept such applications.”
The latest data on processing times for applications submitted in Sarajevo shows an average of 10 days (May 2019). https://visa-processingtimes.homeoffice.gov.uk/y/sarajevo-bosnia-and-herzegovinia/visits-visas/general-visit-6-months-or-less