Find All Triplets with Zero Sum
Given an array arr[], find all possible indices [i, j, k] of triplets [arr[i], arr[j], arr[k]] in the array whose sum is equal to zero. Return indices of […]
Given an array arr[], find all possible indices [i, j, k] of triplets [arr[i], arr[j], arr[k]] in the array whose sum is equal to zero. Return indices of […]
Given a linked list, your task is to complete the function isLengthEven() which contains the head of the linked list, and check whether the length
Given an unsorted array arr and anumber k which is smaller than size of the array. Find if the array contains duplicates within k distance. Examples:
Given an array arr[ ] of positive elements. Consider the array as a circular array, meaning the element after the last element
Given a sorted doubly linked list and an element x, you need to insert the element x into the correct position in the
Given an array arr[] of positive integers. Find the number of pairs of integers whose difference equals a given number k.Note: (a,
You are given a Linked List. Sort the given Linked List using quicksort. Examples: Input: Linked list: 1->6->2Output: 1->2->6Explanation:After sorting the
Given an array arr consisting of positive integer numbers, remove all duplicate numbers. Example: Input: arr[] = [2, 2, 3, 3, 7,
Given an array arr of integers. Find whether three numbers are such that the sum of two elements equals the third element.
Given a singly linked list and a key, count the number of occurrences of the given key in the linked list. Examples: Input: Linked List:
Given an array arr of distinct integers. Rearrange the array in such a way that the first element is the largest and the second
Given an array arr. Return the modified array in such a way that if the current and next numbers are valid numbers and