Cerinta completa Given an array of integers, find the longest subarray where the absolute difference between any two elements is less than or equal to . Example There are two subarrays meeting the criterion: and . The maximum length subarray
Mr K marsh
Cerinta completa Mr K has a rectangular plot of land which may have marshes where fenceposts cannot be set. He wants you to find the perimeter of the largest rectangular fence that can be built on this land. For example,
Pangrams
Cerinta completa A pangram is a string that contains every letter of the alphabet. Given a sentence determine whether it is a pangram in the English alphabet. Ignore case. Return either pangram or not pangram as appropriate. Example The string
Misère Nim
Cerinta completa Two people are playing game of Misère Nim. The basic rules for this game are as follows: The game starts with piles of stones indexed from to . Each pile (where ) has stones. The players move in
Mini-Max Sum
Cerinta completa Given five positive integers, find the minimum and maximum values that can be calculated by summing exactly four of the five integers. Then print the respective minimum and maximum values as a single line of two space-separated long
Modified Kaprekar Numbers
Cerinta completa A modified Kaprekar number is a positive whole number with a special property. If you square it, then split the number into two integers and sum those integers, you have the same value you started with. Consider a
Maximum Palindromes
Cerinta completa Madam Hannah Otto, the CEO of Reviver Corp., is fond of palindromes, or words that read the same forwards or backwards. She thinks palindromic brand names are appealing to millennials. As part of the marketing campaign for the
P-sequences
Cerinta completa We call a sequence of N natural numbers (a1, a2, …, aN) a P-sequence, if the product of any two adjacent numbers in it is not greater than P. In other words, if a sequence (a1, a2, …,
Minimum Operations
Cerinta completa In this challenge, the task is to debug the existing code to successfully execute all provided test files. There are boxes in front of you. For each , box contains red balls, green balls, and blue balls. You
Mining
Cerinta completa There are gold mines along a river, and each mine produces tons of gold. In order to collect the mined gold, we want to redistribute and consolidate it amongst exactly mines where it can be picked up by
