In my opinion it was merry. yes sam was brave and did fight shelob he is a bad ass but he didnt know he would have to face her and was thrust into it and for the majority of the journey he was just there to keep frodo company. Pippin faced his fears and was forced to minastirith and was forced to fight. Merry however, optionally fights for the rohirrim knowing he might ride to his death, along with pippin he charges the black gate, he also help rally the ents and he fully understands the gravity of the situation unlike pippin. so overall i think merry is the bravest and strongest of the hobbits.