Holmes tries to deduce who is killing terminally ill patients on Elementary. "Lesser Evils" is the fifth episode of the show's first season.
Added:

Elementary Season 1 Episode 5 Quotes

Joan: You said the attendant was a friend of yours?
Sherlock: We post in the same bee keeping chat room. He has an impressive amount of Caucasians.... Species of bee.
Joan: Of course it is.

Idiots rely on luck.

Sherlock