For the best, I would say either Miami Vice, Cowboy Bebop or The Wire. See, to have a good ending you must go into your show with the feeling that it MUST end at some point, and rather than hope you'll sort that out later, best to make your ending plan NOW. The Wire set things up for a brilliant conclusion. Likewise, Cowboy Bebop was a single season long, so no issue there. Miami Vice has an excellent ending considering its peers at the time it was running (as in, it actually has an ending episode which wraps things up but gives hope for the future of the characters and isn't too dark.)
For the worst, I don't know. I usually stop watching when I realize it's going nowhere, but Evangelion the TV series had an awful ending (and the show wasn't nearly as deep as it thought it was anyway.) It's not the worst, merely bad. The worst is probably when a good show gets canceled before any final episode can be made, so it just stops. Code Monkeys is a prime example.