## Minimum array elements to be changed to make it a Lucas Sequence

Given an array with N distinct elements. The task is to find the minimum number of elements to be changed in the array such that,… Read More »

- Count pairs in array whose sum is divisible by K
- Find minimum difference between any two elements | Set 2
- Count sub-arrays whose product is divisible by k
- Queries to check if string B exists as substring in string A
- Count of pairs of strings which differ in exactly one position
- Minimum cost to modify a string
- Count all elements in the array which appears at least K times after their first occurrence
- Count number of distinct substrings of a given length
- Maximize the number of sum pairs which are divisible by K
- Sum of all odd frequency nodes of the Linked List
- Number of subarrays having sum of the form k^m, m >= 0
- Rearrange given string to maximize the occurrence of string t
- Number of pairs from the first N natural numbers whose sum is divisible by K
- Maximum count of pairs which generate the same sum
- Number of ways in which the substring in range [L, R] can be formed using characters out of the range
- Total distinct pairs of ugly numbers from two arrays
- Print all the sum pairs which occur maximum number of times
- Number of times the given string occurs in the array in the range [l, r]
- Count pairs with average present in the same array
- Total character pairs from two strings, with equal number of set bits in their ascii value
- Check if a given number divides the sum of the factorials of its digits
- Distinct pairs from given arrays (a[i], b[j]) such that (a[i] + b[j]) is a Fibonacci number
- Total distinct pairs from two arrays such that second number can be obtained by inverting bits of first

Given an array with N distinct elements. The task is to find the minimum number of elements to be changed in the array such that,… Read More »

Given an array. The task is to find the length of the longest subsequence in which all elements must have at least one digit in… Read More »

The hash_hmac_algos() function is an inbuilt function in PHP which is used to get the a list of registered hashing algorithms suitable for hash_hmac() function.… Read More »

The hash_equals function() is an inbuilt function in PHP which is used to compares two strings using the same time whether they are equal or… Read More »

The hash_copy() function is an inbuilt function in PHP which is used to get the copy of hashing context. Syntax: hash_copy( $context ) Parameters: This… Read More »

The hash_algos() function is an inbuilt function in PHP which is used to return a list of registered hashing algorithms. Syntax: array hash_algos( void )… Read More »

Given an integer . The task is to find all factors of N and print the product of four factors of N such that: Sum… Read More »

Given two unsorted arrays arr1[] and arr2[]. They may contain duplicates. For each element in arr1[] count elements less than or equal to it in… Read More »

Given two arrays arr1[] and arr2[]. The task is to find the count of such elements in the first array whose at-least one factor is… Read More »

Given a String str containing only lowercase English alphabets and an integer K. The task is to check that whether the string can be converted… Read More »

The SHA-2 family of cryptographic hash functions consists of six hash functions. These are: SHA-224, with 224 bit hash values SHA-256, with 256 bit hash… Read More »

SHA-1 or Secure Hash Algorithm 1 is a cryptographic hash function which takes an input and produces a 160-bit (20-byte) hash value. This hash value… Read More »

The MD2 is a Message-Digest Algorithm. It is a cryptographic hash function developed by Ronald Rivest in 1989. It is optimized for 8-bit computers. The… Read More »