MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / Insert

Method Insert

Arrays/17_nsertion_and_Deletion.cpp:54–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52// Now to access element from array class we will use Scope Resolution (::) followed by Class name
53
54void Array :: Insert (int index , int x)
55{
56 if (index >=0 && index <=length )
57 {
58 for (int i=length-1;i>index;i--)
59 A[i+1]=A[i];
60 A[index]=x;
61 length++;
62 }
63 }
64
65int Array :: Delete (int index)
66{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected