What is the Algorithm of Insertion of element in array

  • What is the Algorithm of Insertion of element in array


  • 1 Comment sorted by


  • Algorithm: insertion in an array.
    Step 1: [initialize counter] Set J: = N.
    Step 2: Repeat steps 3 and 4 while J >= K.
    Step 3: set LA[ X+1] := LA [ X ].
    Step 4: [decrease counter] set X := X-1
    [end of step 2 loop]
    Step 5: [insert element] set LA[K] : = ITEM
    Step 6: [reset N] set N := N+1
    Step 7: Exit.


Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week

    Optimum Creative