Company: Walmart_12march
Difficulty: medium
Mystic Array Operations Problem Description In the enchanting land of Algoria, where mountains whispered secrets and rivers hummed ancient tunes, lived an old wizard named Elric. Elric was the guardian of the Mystic Array, a magical construct capable of infinite growth. Legends spoke of its origin, crafted by the First Enchanter to test the wisdom and patience of future generations. One misty morning, Elric found a sealed parchment at his doorstep. The wax bore the insignia of the Oracle of Queries, a mysterious entity known for its perplexing challenges. The message read: "Wizard Elric, the time has come to test your command over the Mystic Array. Perform the following spells and unveil the hidden elements that lie within. Only then shall you prove yourself worthy of the Enchanter's Legacy." The parchment listed a series of spells, each described as follows: T=1: Invoke the Growth Spell to append an element X to the end of the array. T=2: Cast the Replication Charm to append X copies