Have a look at where its going wrong. Thanks.
hello @Shubh_rmcf07,
here add one extra consdtion i.e dist[i]==INT_MAX || dist[i]==0