Edward I of England
Edward I (17/18 June 1239 – 7 July 1307), also known as Edward Longshanks and the Hammer of the Scots ( ), was King of England from 1272 to 1307. Before his accession to the throne, he was commonly referred to as The Lord Edward. The first son of Henry III, Edward was involved from an early age in the political intrigues of his father's reign, which included an outright rebellion by the English barons. In 1259, he briefly sided with a baronial reform movement, supporting the Provisions of Oxford. After reconciliation with his father, however, he remained loyal throughout the subsequent armed conflict, known as the Second Barons' War. After the Battle of Lewes, Edward was hostage to the rebellious barons, but escaped after a few months and defeated the baronial leader Simon de Montfort at the Battle of Evesham in 1265. Within two years the rebellion was extinguished and, with England pacified, Edward joined the Ninth Crusade to the Holy Land. He was on his way home in 1272 when he was informed that his father had died. Making a slow return, he reached England in 1274 and was crowned at Westminster Abbey.
Edward I of England
Edward spent much of his reign reforming royal administration and common law. Through an extensive legal inquiry, he investigated the tenure of various feudal liberties, while the law was reformed through a series of statutes regulating criminal and property law. Increasingly, however, Edward's attention was drawn towards military affairs. After suppressing a minor rebellion in Wales in 1276–77, Edward responded to a second rebellion in 1282–83 with a full-scale war of conquest. After a successful campaign, he subjected Wales to English rule, built a series of castles and towns in the countryside and settled them with English people. Next, his efforts were directed towards the Kingdom of Scotland. Initially invited to arbitrate a succession dispute, Edward claimed feudal suzerainty over Scotland. The war that followed continued after Edward's death, even though the English seemed victorious at several points. Simultaneously, Edward found himself at war with France (a Scottish ally) after King Philip IV of France had confiscated the Duchy of Gascony, which until then had been held in personal union with the Kingdom of England. Although Edward recovered his duchy, this conflict relieved English military pressure against Scotland. At the same time there were problems at home. In the mid-1290s, extensive military campaigns required high levels of taxation, and Edward met with both lay and ecclesiastical opposition. These crises were initially averted, but issues remained unsettled. When the King died in 1307, he left to his son Edward II an ongoing war with Scotland and many financial and political problems.
Builth Castle
Builth Castle ( ) was a castle built under King Edward I, just outside Builth Wells, Powys, Wales. At one time it was an impressive stone-built castle but all the masonry has been removed over the years and all that remains are the mound on which it stood, the ditches and embankments.

Question: Who was the reigning king when the Builth Castle was built and who was also known as "Malleus Scotorum"?
Answer: Edward I