Cerinta completa Given an array of integers and a target value, determine the number of pairs of array elements that have a difference equal to the target value. Example There are three values that differ by : , , and
Modify The Sequence
Cerinta completa You are given a sequence of integers a1,a2,a3…..an. You are free to replace any integer with any other positive integer. How many integers must be replaced to make the resulting sequence strictly increasing? Input Format The first line
Points in a Plane
Cerinta completa There are N points on an XY plane. In one turn, you can select a set of collinear points on the plane and remove them. Your goal is to remove all the points in the least number of
Non-Divisible Subset
Cerinta completa Given a set of distinct integers, print the size of a maximal subset of where the sum of any numbers in is not evenly divisible by . Example One of the arrays that can be created is .
Missing Numbers
Cerinta completa Given two arrays of integers, find which elements in the second array are missing from the first array. Example The array is the orginal list. The numbers missing are . Notes If a number occurs multiple times in
Nikita and the Game
Cerinta completa Nikita just came up with a new array game. The rules are as follows: Initially, Nikita has an array of integers. In each move, Nikita must partition the array into non-empty contiguous parts such that the sum of
Picking Numbers
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
Morgan and a String
Cerinta completa Jack and Daniel are friends. Both of them like letters, especially uppercase ones. They are cutting uppercase letters from newspapers, and each one of them has his collection of letters stored in a stack. One beautiful day, Morgan
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
