Riddle-tales

Riddle-tales are traditional stories featuring riddle-contests. They frequently provide the context for the preservation of ancient riddles for posterity, and as such have both been studied as a narrative form in their own right, and for the riddles they contain. Such contests are a subset of wisdom contests more generally. They tend to fall into two groups: testing the wisdom of a king or other aristocrat; and testing the suitability of a suitor. Correspondingly, the Aarne–Thompson classification systems catalogue two main folktale-types including riddle-contests: AT 927, Outriddling the Judge, and AT 851, The Princess Who Can Not Solve the Riddle. Such stories invariably include answers to the riddles posed: 'the audience cannot be left dangling'.
Background.
The earliest example of a wisdom contest between kings is the Sumerian epic "Enmerkar and the Lord of Aratta", from the first half of the second millennium BC, closely followed by the Egyptian "The Quarrel of Apophis and Seqenenre", fragmentarily attested in a thirteenth-century BC papyrus about the Pharaoh Apophis and Seqenenre Tao. "The Quarrel of Apophis and Segenenre" is echoed in the later "Tale of Setne Khamwas and Si-Osire", attested on papyrus in the Roman period, showing that this type of story continued to circulate in Egypt. However, these tales do not involve riddles as such.
These Egyptian stories, probably via lost Greek material, seem to have been an inspiration for the account of a wisdom-contest between Pharaoh Amasis II and the king of Ethiopia, in which the sage Bias of Priene helps the Pharaoh by solving the riddles, in Plutarch's first- or second-century AD "Convivium Septem Sapientium". At least one of Plutarch's sources was probably shared by the "Aesop Romance", which originated around the fourth century BC (chs 102–8, 111–23). The "Aesop Romance" also drew on similar stories of wisdom contests in various versions of the "Story of Ahikar".
List of riddle-tales.
The following list is based on the survey by Goldberg.
Christian Schneller, in the 19th century, collected a tale from Wälschtirol (Trentino) that is quite similar to the Turandot stories: a king invades the neighbouring country and imprisons the royal couple, but their son escapes and is raised by a poor man. Years later, the boy travels to the enemy kingdom and learns that their parents are alive and the princess is testing potential suitors with deadly riddles.
In a Sri Lankan tale, "The Riddle Princess: Terávili Kumari Kava", a princess loves solving riddles. A Rajah's son falls in love with her portrait and disguises himself as a penniless pilgrim in order to get to know the princess, as part of his plan.