Problem We need to partition a provided vector vec into 2 slices, each having the same sum of the elements. Example 1: Input: vec = [7, -5, -4, 2,...

Problem We need to sort a provided vector vec using Quicksort algorithm. It is a commonly used divide and conquer sorting algorithm that on average...

Problem In a vector vec we need to find all pairs of the elements with a provided difference diff. Example 1: Input: vec = [1, 5, 2, 2, 2, 5, 5, 4],...

Problem In a provided vector vec we need to find a slice with the largest sum of the elements. This problem is commonly referred to as Maximum...

Problem In a provided vector vec we need to find the majority element, if it is present. The majority element is the element that appears in the...

Problem In a provided vector vec we need to move all 0 elements to the end of the vector. A relative order of other elements should not...