So, I’m of two minds here, mostly because these are really two distinct concepts.
My favorite traps would have to be the kind that empower undead and weaken the living. I have a particular love for the undead, and playing to their strengths is always a good thing to do. Something with Enervation should do the trick, though several spells heal undead while hurting the living.
Alternately, everyone love 5 foot square pit trap with a gelatinous cube that falls from overhead, filling the space and enveloping the trapped individual 🙂
My favorite kind of puzzle is an integrated dungeon. More or less, the players can solve certain mechanical puzzles, and which path they take through the dungeon depends on what they solve and how they solve it. Basically, they need to solve puzzles to move on, but only a specific sequence will take them through all the rooms of the dungeon.
I did this with a party by having them enter a temple of Tiamat. The temple was designed to house several dragons comfortably and to protect both the dragons and their treasure. The PCs left that temple with enough gold to afford diamond shoes. Not diamond encrusted shoes – shoes made from one enormous diamond.