Cricket Rating In computer science, the maximum subarray problem is the task of finding the contiguous subarray within a one-dimensional array of numbers which has the largest sum. India is a cricket crazy nation. Chang also loves cricket and computations related to cricket. Chang has created a Cricket app.This app analyses the performance of a cricketer. If a cricketer under-performs, then a negative rating is awarded. If performance is good, then positive rating is awarded to the cricketer.Chang wants to …

Home » Competitive » Hackerearth

# Category: Hackerearth

Print coderinme As a beginner to the programming, Sana came to Coderinme platform, to become a better programmer. She solved some problems and felt very confident. Later being a fan of Coderinme, she gave a problem to her friends to solve. They will be given a string containing only lower case characters (a-z), and they need to find that by using the characters of the given string, how many times they can print “Coderinme”(without quotes). As they are new to …

The great kian `Hackerearth` The great Kian is looking for a smart prime minister. He’s looking for a guy who can solve the OLP (Old Legendary Problem). OLP is an old problem (obviously) that no one was able to solve it yet (like P=NP). But still, you want to be the prime minister really bad. So here’s the problem: Given the sequence a1, a2, …, an find the three values a1 + a4 + a7 + …, a2 + a5 …

Debt of Lannister Lannister’s Debt Tyrion Lannister wants to pay Bronn reward for his services. Being a Lannister, he has an unlimited number of coins of denominations A, and B. He has also got an unlimited number of bags, in which he can give the money. Each bag can contain at most N rupees. Tyrion wants to pay Bronn at least M rupees. As you know, Tyrion cannot lift many bags, so he wants to minimise the number of bags. …

Nice Arches Hackerearth Nikki’s latest work is writing a story of letters. However, she finds writing story so boring that, after working for three hours, she realized that all she has written are M long words consisting entirely of letters A and B. Having accepted that she will never finish the story in time, poor Nikki has decided to at least have some fun with it by counting bubbly words. Now Nikki is connecting pairs of identical letters (A with …

Monk loves to preform different operations on arrays, and so being the principal of Hackerearth School, he assigned a task to his new student Mishki. Mishki will be provided with an integer array $$A$$ of size $$N$$ and an integer $$K$$ , where she needs to rotate the array in the right direction by K steps and then print the resultant array. As she is new to the school, please help her to complete the task.

Bob and Bombs Bob and Bombs problems: Bob and Khatu are brave soldiers in World War 3(. They have spotted an enemy troop which is planting bombs. They sent message to the command centre containing characters W and B where W represents a wall and B represents a Bomb. They asked command to tell them how many walls will be destroyed if all bombs explode at once. One bomb can destroy 2 walls on both sides. Input: First line of …