Upper bound algorithm how can I translate my algorithm in julia code

Please see the (draft) homework policy here: