What type of screw is the most resistant to rust: galvanized, stainless steel, or deck screws?
The stainless steel screw will absolutely be the best screw to resist rust.  Stainless steel screws are rust-resistant throughout the entire screw, not just on the surface.  

The other screws are only covered with a rust-resistant coating on their surface, which will break down or wear off over time.  Galvanization is a process that coats with zinc.  Other screws may be zinc coated as well using another process, or they may be coated with something else.

I have some screws on an outdoor fence which have rusted inside the slots in the screw head, because the screw driver tip wore away some of the coating in the slots at time of installation.  Phillips-head screws in particular are notorious for getting ground up when the tip "cams out" and jumps out of the screw head.

Stainless steel is undoubtedly the best material for resisting rust and corrosion in screws.  Why, then, would anyone use anything other than stainless steel outdoors?  Two reasons: 

(1) Stainless steel is slightly softer than the hard steel used in deck screws or other similar screws.  You can't just "go crazy" with the power tools and slam the screws into place.  It is easier to chew up the heads on stainless screws, or to snap the heads right off by over-torquing them (though that is more of a problem with bolts than wood screws).  You have to slow down and be a little more careful.

(2) Stainless steel screws are more expensive.  Galvanized or other coated screws are just plain cheaper.

Despite those drawbacks, the rust prevention is unmatched by other screws.  I live in a rainy wet climate, so I use stainless screws on anything outside that I might need to ever take apart again.