What's the thought process behind writing detective stories?

Back in university I had an Intro to Fiction teacher that tried to explain a little bit about this process. My professor told us that some detective stories were written in order that the reader used the fictional detectives method for solving the crime in the book in order to try and “solve” the short story itself.Throughout the class we read plenty of short detective stories by my favorite by far was The Purloined Letter by Edgar Allen Poe. Example, in the PL, Dupin ends up solving the mystery by thinking with a mathematical (quantitative mindset) as well as a poet (creative qualitative mindset) and finds the answer he is looking for by searching in the opposite direction that the rest of the characters are looking. 

So when trying to apply this to the reader “solving” the story, where could they look that is in the opposite place that everyone else is searching? I wrote my final paper on this question and would love to talk to anyone who is interested about it. Hint: Check out the title.

The Purloined Letter


The Purloined Letter by Edgar Allan Poe