The squat and the deadlift are two types of exercises that are meant to improve the legs but the movement that you have to do are different from each other. The squat will require you to focus on your knee then drop your butt towards the ground so that your legs will get the proper workout. A deadlift will require you to use your back so that you can hinge your hips more and load your glutes.
Some may think that doing a deadlift will replace doing squats but if you are required to do these two exercises, then push through with doing both. One cannot be replaced for the other. You need to use both to get the legs that you want.