The path travelled by light for both YDSE and diffraction is same for the same point on the screen. However, in diffraction the initial phase difference at the two ends of the slits is π. Due to this additional phase difference of π, positions of bright fringe in YDSE is the position of dark fringe in ydse.