Click here to Skip to main content
16,015,414 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how we do insert and delete and search in Array
Posted
Comments
vonpik 24-Mar-12 10:33am    
What kind of array you have in mind? Basic array from C++ standard? String array? Or array type in some library?

1 solution

An array does not have "Insert" or "Delete" - you would have to do these either by shuffling data up or down (if you allocated enough space) or by allocating a bigger / smaller array and copying the relevant data chunks over into the appropriate places.

Searching depends on the size of the array, the degree of order in it, and the algorithm you want to use.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900