With Diddy, do a regular jump. Just before you hit the ground, press A for a double jump and press B immediately after A. If you timed it correctly, Diddy will do a double jump and a standing attack in the air. Standing attacks can be cancelled with a jump, so you can simply jump out of this mid-air ground attack. Do an aerial attack out of that jump and you'll reach higher ledges than the backflip can get you to.
For some reason, the timing for this trick is easier if you have at least one Crystal Coconut. If you don't have any, you'll need to release A before you press B when attempting the mid-air ground attack.