Beautiful Days at the Movies | Hackerrank Solutions
Lily likes to play games with integers. She has created a new game where she determines the difference between a…
Programming, AI, Machine Learning & Software Development Tutorials
Find solutions to HackerRank problems in various domains and languages. Browse through the top interview questions, code compiler, and view the solutions online or download them.
Lily likes to play games with integers. She has created a new game where she determines the difference between a…
A jail has a number of prisoners and a number of treats to pass out to them. Their jailer decides…
Charlie possesses an extraordinary tool in his possession: a magic mirror capable of displaying right-rotated versions of any given word.…
A Discrete Mathematics professor has a class of students. Frustrated with their lack of discipline, the professor decides to cancel…
The Utopian Tree goes through 2 cycles of growth every year. Each spring, it doubles in height. Each summer, its height increases by 1 meter. A…
When a contiguous block of text is selected in a PDF viewer, the selection is highlighted with a blue rectangle.…
A video player plays a game in which the character competes in a hurdle race. Hurdles are of varying heights,…
Problem Overview Given an array of integers, our task is to find the longest subarray such that the absolute difference…
We define a magic square to be an n*n matrix of distinct positive integers from 1 to n^2 where the sum of any row, column, or diagonal of…
Two cats and a mouse are at various positions on a line. You will be given their starting positions. Your…
You are in charge of the cake for a child’s birthday. You have decided the cake will have one candle…
Given five positive integers, find the minimum and maximum values that can be calculated by summing exactly four of the…
Given a square matrix, calculate the absolute difference between the sums of its diagonals. For example, the square matrix is shown…
Alice and Bob each created one problem for HackerRank. A reviewer rates the two challenges, awarding points on a scale…
When working with arrays, solving problems like finding two elements that sum up to a target or three elements with…