edualgo / interview-corner

Many time, when an interview approaches, candidates start searching for different algorithms in different programming languages for practise. This project aims to build a website which will contain the codes along with the techniques and explanations so that it can be helpful for many
https://opensource.edualgoacademy.com/interview-corner/
MIT License
42 stars 41 forks source link

Left Rotation #74

Open abhay313 opened 3 years ago

abhay313 commented 3 years ago

Problem description: A left rotation operation on an array of size n shifts each of the array's elements 1 unit to the left. Given an integer, d, rotate the array that many steps left and return the result.

Input 5 4 1 2 3 4 5

Output 5 1 2 3 4

abhay313 commented 3 years ago

I would like to implement it into C++, please assign this to me under SWoC.