Javascript Program for Two Pointers Technique
Two pointers is really an easy and effective technique which is typically used for searching pairs in a sorted array.Given a sorted array A (sorted in ascending order), having N integers, find if there exists any pair of elements (A[i], A[j]) such that their sum is equal to X....
read more
Javascript Program to Find a triplet that sum to a given value
Given an array and a value, find if there is a triplet in array whose sum is equal to the given value. If there is such a triplet present in array, then print the triplet and return true. Else return false....
read more
Javascript Program to Find all triplets with zero sum
Given an array of distinct elements. The task is to find triplets in the array whose sum is zero....
read more
Javascript Program to Print uncommon elements from two sorted arrays
Given two sorted arrays of distinct elements, we need to print those elements from both arrays that are not common. The output should be printed in sorted order. Examples :...
read more
Php Program to Print uncommon elements from two sorted arrays
Given two sorted arrays of distinct elements, we need to print those elements from both arrays that are not common. The output should be printed in sorted order. Examples :...
read more
Php Program to Find a triplet such that sum of two equals to third element
Given an array of integers, you have to find three numbers such that the sum of two elements equals the third element.Examples:...
read more
Javascript Program to Find a triplet such that sum of two equals to third element
Given an array of integers, you have to find three numbers such that the sum of two elements equals the third element.Examples:...
read more
Maximum length of consecutive 1s or 0s after flipping at most K characters
Given a binary string S of size N and an integer K, the task is to find the maximum length of consecutive 1s or 0s after flipping at most K characters of the given binary string S....
read more
Java Program for Two Pointers Technique
Two pointers is really an easy and effective technique which is typically used for searching pairs in a sorted array.Given a sorted array A (sorted in ascending order), having N integers, find if there exists any pair of elements (A[i], A[j]) such that their sum is equal to X....
read more
Length of longest subarray with increasing contiguous elements
Given an array arr[] of length N, the task is to find the length of the longest subarray which consists of consecutive numbers in increasing order, from the array....
read more
Find the elements appearing even number of times in an Array
Given an array arr[] consisting of N positive numbers in the range [1, N], the task is to print the array elements which appear even number of times in the given array....
read more
Sum of array using pointer arithmetic
Given an array, write a program to find the sum of array using pointers arithmetic. In this program we make use of * operator . The * (asterisk) operator denotes the value of variable. The * operator at the time of declaration denotes that this is a pointer, otherwise it denotes the value of the memory location pointed by the pointer . sum() function is used to find the sum of the array through pointers....
read more