I refer you back to the last time you asked this question:
C# how to remove random element[
^] where you were reminded that the solution to teh question before that:
C# - how can I count the number of elements in an array?[
^] contains the algorithm.
We are not here to do your homework. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
Try it yourself, you may find it is not as difficult as you think.
Because if you don't, you will never learn how to "think correctly" and be able to do this for yourself. And that means you will fail your course, as when you get to the exam you will have no one to write it for you ... So sit down, start reading, start thinking - and give it a try instead of expecting others to do it for you: that isn;t how development works.