Home
Class 12
MATHS
Festival season is going in Agrabah and ...

Festival season is going in Agrabah and the people are going crazy to see various sorcerers, craftsmen etc. who are visiting the city to showcase their magic. A large crowd has gathered around a Card-master who is asking a logical riddle to the crowd. Whosoever succeeds in solving the riddle gets a reward. He arranges the cards of first 20 natural numbers and lists down the difference between two consecutive numbers (value on right card minus value on the left card) of the arrangement, which are 19 in number. The difference is given as
-11 8 -7 -2 11 -4 12 -15 11 3 -13 9 -1 -3 6 -10 -3 5 9
The city is beautifully lightened up with candles and diyas and the vibes of happiness and joy were coming from all the directions. Aladdin and Abu are also enjoying the festival when they find a very interesting game of balloons. Inflated balloons are arranged in a straight line and are marked with English Upper case letters. The player can perform the following action any number of times (including zero): Choose any one of the balloons from the straight line and replace the letter on it with any other Uppercase English letter.
Note that even if the replaced letter occurs S multiple times, only the chosen occur- rence of this letter is replaced.
Find the sum of the minimum number of operations required to convert the given balloon line to balanced ones. Let's call a balloon line balanced if all characters that occur in this balloon line occur the same number of times.
Line 1: ABAAACDHIAACKIOA (16 letters)
Line 2: BBCABCDFAHABNAJHDYWGEJA (23 letters)
Line 3: ABSDJAHSABDJAMDHANDHASAKIABCHD (30 letters)

Promotional Banner

Similar Questions

Explore conceptually related problems

Festival season is going in Agrabah and the people are going crazy to see various sorcerers, craftsmen etc. who are visiting the city to showcase their magic. A large crowd has gathered around a Card-master who is asking a logical riddle to the crowd. Whosoever succeeds in solving the riddle gets a reward. He arranges the cards of first 20 natural numbers and lists down the difference between two consecutive numbers (value on right card minus value on the left card) of the arrangement, which are 19 in number. The difference is given as -11 8 -7 -2 11 -4 12 -15 11 3 -13 9 -1 -3 6 -10 -3 5 9 Find the sum of the numbers at odd places of the arrangement of the cards?

Agrabah, the city of mystery, enchantments and the finest merchandise located on the side of the river Jordan. It is under the rule of the king named Sultan. Aladdin lives in a hovel with his monkey Abu where he has spent most of his childhood. Now it’s time to explore more about this mysterious city! Festival season is going in Agrabah and the people are going crazy to see various sorcerers, craftsmen etc. who are visiting the city to showcase their magic. A large crowd has gathered around a Card-master who is asking a logical riddle to the crowd. Whosoever succeeds in solving the riddle gets a reward. He arranges the cards of first 20 natural numbers and lists down the difference between two consecutive numbers (value on right card minus value on the left card) of the arrangement, which are 19 in number. The difference is given as -11 8 -7 -2 11 -4 12 -15 11 3 -13 9 -1 -3 6 -10 -3 5 9 What is the first number of his arrangement of cards from the left?