I need the programs to these algorithms.
These are the algorithms of the programs of Insertion & Deletion. I need the C++ programs.
Insertion
temp1 & temp2 are strings
1. temp1= substring (T, 0, ip)
2. temp2= substring (T, ip, length(T) - ip + 1)
3. concatenate (temp1, P)
4. concatenate (temp1, temp2)
5. T= temp1
6. Exit
Deletion
- temp1 = substring (T, 0, ip)
- temp2 = substring (T, ip + L, length(T) -ip - L + 1)
- T=concatenate (temp1, temp2)
- Exit