Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please if you\'re not sure do not answer. And do not copy please... Write pseudo

ID: 3904941 • Letter: P

Question

please if you're not sure do not answer. And do not copy please...

Write pseudo code to do the following. Your pseudo code or algorithm must follow all the rules of an algorithm. It must be written in steps. No paragraphs. All conditions and iterations must be clearly specified. You must use loops and functions to do this. The steps in the pseudo code must be very clear without ambiguity. Please submit a separate txt file for this part. Name it final.txt.
1. To remove numbers from an array given the array and the position of the number to remove. You should not replace the element with 0. If your original array was {34, 12, 56, 18, 20, 16, 8, 9, 10, 11}, after removing the element from position 0, your array should print {12, 56, 18, 20, 16, 8, 9, 10 11}.
2. To insert numbers from an array given the array, the number to insert, and the position where the number should be inserted. If your original array was {34, 12, 56, 18, 9, 10, 11}, after inserting the number 15 at position 1, your array should print {15, 34, 12, 56, 18, 9, 10 11}. You should make sure that size does not exceed capacity when inserting.

Explanation / Answer

1. Removing a number with given index

   1. Check the index.If it is more than the capacity or negative ,declare invalid value
   2. If valid then Move to the required index.
   2. Fill that position with the preceding number
   3. Repeat the activity till we reach at the end.

2. Inserting a number

   1. Check the index.If it is more than the capacity or negative ,declare invalid value
   1. If index is valid ,Check the current number of elements n.
   2. If n is equal to the capacity, declare insertion not possible as array is full
   3. If n < capacity , Move to the last index of the array.
   3. Move an element to the next position (last index + 1)
   4. Repeat the activity till we reach the required index.
   5. Fill the position with the element