In a graph G with fixed source s, we design a distance oracle that can answer the following query: QU(s,t,e) -- find the length of the shortest path from the source s to any destination vertex t while avoiding any edge e. We design a deterministic algorithm that builds such an oracle in $\Tilde{O}(m\sqrt n)$ time\footnote{$\Tilde{O}$ hides poly$\log n$ factor} \footnote{A preliminary version of this article appeared in the Proceedings of 30th Annual European Symposium on Algorithms (ESA 2022), 5-9 September 2022, Potsdam, Germany \cite{DeyGupta} }. Our oracle uses $\Tilde{O}(n\sqrt n)$ space and can answer queries in $\Tilde{O}(1)$ time. Our oracle is an improvement of the work of Bil\'{o} et al. (ESA 2021) in the preprocessing time, which constructs the first deterministic oracle for this problem in $\Tilde{O}(m\sqrt n+n^2)$ time.
Using our distance oracle, we also solve the single source replacement path problem (SSRP problem).Chechik and Cohen (SODA 2019) designed a randomised combinatorial algorithm to solve the $\SSR$ problem. The running time of their algorithm is $\Tilde{O}(m\sqrt n + |R|)$ time, where R is the output set of the SSRP problem in G. Our SSRP algorithm is optimal (upto polylogarithmic factor) as there is a conditional lower bound of $\Omega(m\sqrt n)$ for any combinatorial algorithm that solves this problem.