We have n boxes in which we have to place c magnets such that minimum distance between two magnet should be maximum. As we know any two magnet become aggressive when kept Read more →
Programs
1 postIn Artificial Intelligence you will encounter this puzzle. Given below is a crypt-arithmetic problem solved. Example : SEND + MORE ------- = MONEY ------- CP + IS + FUN -------- = TRUE Read more →
You have to paint n boards of length {L1, L2, L3,…,Ln-1}. There are k painters available and each painter takes t time to paint 1 unit of board. You have to get Read more →
Given an array A[] and size of array is N. The task is to replace element of array A[] are in given range L to R both are included. Element replace by Read more →
There is given a sum and you have to find whether this sum is resultant of summation of first n natural numbers or not. If it is summation of first n natural Read more →
You have a total of n coins and you want to arrange the coins in staircase shape, where every i-th row must have exactly i coins. You want to find the total Read more →
Given an array arr[] and the two elements x and y, the task is to find which element(x or y) has highest occurrence in the array. If the occurrences are the same, Read more →
Given an integer array arr[] and K, the task is to count the number of elements ‘A[i]’, such that A[i] * K is also present in the array. Note: If there are Read more →
Given an array arr[] of n elements, write a function to search a given element x in arr[]. Examples: Input : arr[] = {10, 20, 80, 30, 60, 50, 110, 100, 130, Read more →
Given two strings string1 and string2, the task is to find the smallest substring in string1 containing all characters of string2. Examples : Input: string = “Cplusplus is the best”, pattern = Read more →