GIVEN AN INPUT STRING S AND TWO CHARACTERS C1 AND C2, YOU NEED TO REPLACE EVERY OCCURRENCE OF CHARACTER C1 WITH CHARACTER C2 IN THE GIVEN STRING. DO THIS RECURSIVELY.

GIVEN AN INPUT STRING S AND TWO CHARACTERS C1 AND C2, YOU NEED TO REPLACE EVERY OCCURRENCE OF CHARACTER C1 WITH CHARACTER C2 IN THE GIVEN STRING. DO THIS RECURSIVELY.

YOU HAVE BEEN GIVEN AN INTEGER ARRAY/LIST(ARR) OF SIZE N. IT HAS BEEN SORTED(IN INCREASING ORDER) AND THEN ROTATED BY SOME NUMBER ‘K’ IN THE CLOCKWISE DIRECTION. YOUR TASK IS TO WRITE A FUNCTION THAT RETURNS THE VALUE OF ‘K’, THAT MEANS, THE INDEX FROM WHICH THE ARRAY/LIST HAS BEEN ROTATED.

YOU HAVE BEEN GIVEN AN INTEGER ARRAY/LIST(ARR) OF SIZE N. IT HAS BEEN SORTED(IN INCREASING ORDER) AND THEN ROTATED BY SOME NUMBER ‘K’ IN THE CLOCKWISE DIRECTION. YOUR TASK IS TO WRITE A FUNCTION THAT RETURNS THE VALUE OF ‘K’, THAT MEANS, THE INDEX FROM WHICH THE ARRAY/LIST HAS BEEN ROTATED.

YOU HAVE BEEN GIVEN A RANDOM INTEGER ARRAY/LIST(ARR) OF SIZE N. WRITE A FUNCTION THAT ROTATES THE GIVEN ARRAY/LIST BY D ELEMENTS(TOWARDS THE LEFT).

YOU HAVE BEEN GIVEN A RANDOM INTEGER ARRAY/LIST(ARR) OF SIZE N. WRITE A FUNCTION THAT ROTATES THE GIVEN ARRAY/LIST BY D ELEMENTS(TOWARDS THE LEFT).You have been given a random integer array/list(ARR) of size N. Write a function that rotates the given array/list by D elements(towards the left).

GIVEN A RANDOM INTEGER ARRAY AND A NUMBER X. FIND AND PRINT THE TRIPLETS OF ELEMENTS IN THE ARRAY THAT SUM TO X. WHILE PRINTING A TRIPLET, PRINT THE SMALLEST ELEMENT FIRST. THAT IS IF A VALID TRIPLET IS (6, 5, 10) PRINT “5 6 10”. THERE IS NO CONSTRAINT THAT OUT OF 5 TRIPLETS WHICH HAVE TO BE PRINTED ON 1ST LINE. YOU CAN PRINT TRIPLETS IN ANY ORDER, JUST BE CAREFUL ABOUT THE ORDER OF ELEMENTS IN A TRIPLET.

GIVEN A RANDOM INTEGER ARRAY AND A NUMBER X. FIND AND PRINT THE TRIPLETS OF ELEMENTS IN THE ARRAY THAT SUM TO X. WHILE PRINTING A TRIPLET, PRINT THE SMALLEST ELEMENT FIRST. THAT IS IF A VALID TRIPLET IS (6, 5, 10) PRINT “5 6 10”. THERE IS NO CONSTRAINT THAT OUT OF 5 TRIPLETS WHICH HAVE TO BE PRINTED ON 1ST LINE. YOU CAN PRINT TRIPLETS IN ANY ORDER, JUST BE CAREFUL ABOUT THE ORDER OF ELEMENTS IN A TRIPLET.

GIVEN TWO RANDOM INTEGER ARRAYS, PRINT THEIR INTERSECTION. THAT IS, PRINT ALL THE ELEMENTS THAT ARE PRESENT IN BOTH THE GIVEN ARRAYS. INPUT ARRAYS CAN CONTAIN DUPLICATE ELEMENTS.

GIVEN TWO RANDOM INTEGER ARRAYS, PRINT THEIR INTERSECTION. THAT IS, PRINT ALL THE ELEMENTS THAT ARE PRESENT IN BOTH THE GIVEN ARRAYS. INPUT ARRAYS CAN CONTAIN DUPLICATE ELEMENTS.