Breakdown of Hast du den Polizisten gefragt?
du
you (informal singular)
fragen
to ask
haben
to have
der
who, which, that (relative pronoun; die, das)
Questions & Answers about Hast du den Polizisten gefragt?
Why is it den Polizisten and not den Polizist?
Polizist belongs to a special group of masculine nouns called "weak nouns" (or N-declension nouns). Whenever these nouns are used as an object, such as in the accusative or dative case, they get an extra -n or -en at the end. Here, der Polizist is the direct object, so it becomes den Polizisten.
Does Polizisten mean "police officers" (plural) in this sentence?
No, it is just one police officer! Because of the weak noun rule, the singular accusative form (den Polizisten) looks exactly like the plural form. You can tell it is singular here because the article is den (the masculine accusative "the"), not the plural article die.
Why is the police officer in the accusative case here?
The verb fragen (to ask) requires a direct object in German. The person you are asking is receiving the action directly, so they go into the accusative case.
Why are hast and gefragt separated?
This sentence is in the spoken past tense (Perfekt). To form a yes/no question, the conjugated helping verb (hast) moves to the very front of the sentence, and the past participle (gefragt) gets pushed to the very end.