Tag Archives: Once in a tram Solution

HackerRank : Week of Code 34 – Maximum Gcd and Sum

Maximum Gcd and Sum: Hackerrank Maximum Gcd and Sum : You are given two arrays  and  containing  elements each. Choose a pair of elements  such that:  belongs to array .  belongs to array .  is the maximum of all pairs . If there is more than one such pair  having maximum gcd, then choose the one with maximum sum. Print the sum of elements of this… Read More »

HackerRank : Week of Code 34 – Once in a tram

Once in a tram: Hackerrank Once in a tram : One day, Jack was going home by tram. When he got his ticket, he noticed that number on the ticket was not lucky. A lucky ticket is a six-digit number on the ticket in which sum of the first three digits is equal to the sum of the last three digits.… Read More »