I have a array with 2500 elements..I want simple algorithm to get the following.
If the input is 1 , then it should return 1st 50 elements. If the input is 2 it should return 51 to 100th element. if input is 3 it should return 101 to 150th element.
I am too much confused with this algorithm and my mind is not giving any idea,Some one please help me.
Note: i am coding my own pagination for 2500 url..And i need just algorithm idea..not coding