First travel the array exponentially, then once you find anything other than '#', start traversing the array in reverse order exponentially( let's say you are now at loc 'n' then next loc will be n-2 then next n-4, n-8,n-16....) until you again find this symbol '#'. Now again traverse in reverse order(let's say you are at loc. m then next loc will be m+2,m+4...)until you find anything other than '#'. repeat this until you reach a point when there is a difference of 2 in between the loc. of '#' and garbage. Then do a linear access to reach the end element of the array. This whole process would take time $O(log \ n)$