December 12, 2003

Use Lazy Initialization to Conserve Resources

Say you have an object with a property that uses a relatively large amount of resources?and you know the property may never be accessed. Consider waiting to create the property

Remove an Element in a Sorted Array

To remove an element at a given position in a sorted array, shift all the elements above it down one position. void erase(int a[], int& n, int index) { //