Write a c program that rotate elements of an array by the value of configured number "n". For example: Input array[ ] = { 2, 3, 5, 6, 8, 9} value of n = 2 Output array[] = { 5, 6, 8, 9, 2, 3} I am looking for efficient program.
.
Given an unordered array A of size n and integer x. What is the best complexity to find two elements in A whose sum is x? Share the algo, its complexity and if possible C code.
Input: arr[] = {5, 5, 10, -10, -20, 40, 50, 35, -20, -50} Output: 125 (40, 50, 35)