Library Fine HackerRank Solution in C, C++, Java, Python
Your local library needs your help! Given the expected and actual return dates for a library book, create a program that calculates the fine (if any). The fee structure is …
Your local library needs your help! Given the expected and actual return dates for a library book, create a program that calculates the fine (if any). The fee structure is …
Watson likes to challenge Sherlock’s math ability. He will provide a starting and ending value that describe a range of integers, inclusive of the endpoints. Sherlock must determine the number …
You have two strings of lowercase English letters. You can perform two types of operations on the first string: Append a lowercase English letter to the end of the string. …
The factorial of the integer n, written n!, is defined as: Calculate and print the factorial of a given integer. For example, if n=30, we calculate 30*29*28*….*2*1 and get . …
An integer d is a divisor of an integer n if the remainder of n/d=0. Given an integer, for each digit that makes up the integer determine whether it is …
A child is playing a cloud hopping game. In this game, there are sequentially numbered clouds that can be thunderheads or cumulus clouds. The character must jump from cloud to …
Given a sequence of integers, where each element is distinct and satisfies . For each where , find any integer such that and print the value of on a new …
John Watson knows of an operation called a right circular rotation on an array of integers. One rotation operation moves the last array element to the first position and shifts …
A jail has a number of prisoners and a number of treats to pass out to them. Their jailer decides the fairest way to divide the treats is to seat …
HackerLand Enterprise is adopting a new viral advertising strategy. When they launch a new product, they advertise it to exactly 5 people on social media. On the first day, half …