Good mysteries are very hard to write. The puzzle is either too simple and the reader solves it long before the story ends, or the puzzle is too hard and the reader ends up feeling cheated. Finding the right balance is hard, which is why so many mysteries are unreadable, formula-driven hack jobs. Trying to write a good mystery in a science fiction setting is even harder because the background sociology, technology, history, and settings all need to be explained in a way that does not bore the reader to tears, and still allows the story's puzzle to be at the right level. This is a lot harder than it sounds and only a few authors have been able to pull it off.
Larry Niven is one of the few. "The Long Arm of Gil Hamilton" is composed of
three novellas about Gil "the Arm" Hamilton, a detective operating the 22nd century Los Angeles. The stories are strong and, with the exception of the third story, the characters are believable. All of the clues needed to solve each mystery are in place long before the story ends, but solving the puzzle requires thinking outside the box.
The problems with these stories are the same as the problems with most of Niven's pre-Pournelle writings: the writing is bad and the society that he describes is a 1960s version of southern Californian university life transported into the future. It does not feel dated as much as it feels immature. The bad writing, however, is more than made up for by the steady flow of interesting ideas that Niven gives the reader. There are better mysteries, and there is better science fiction, but "The Long Arm of Gil Hamilton" is one of the best fusions of these two genres in print.