CheckRangeFromIndex function it will check the range from the index
(index int)
| 86 | |
| 87 | // CheckRangeFromIndex function it will check the range from the index |
| 88 | func (da *DynamicArray) CheckRangeFromIndex(index int) error { |
| 89 | if index >= da.Size || index < 0 { |
| 90 | return errors.New("index out of range") |
| 91 | } |
| 92 | return nil |
| 93 | } |
| 94 | |
| 95 | // NewCapacity function increase the Capacity |
| 96 | func (da *DynamicArray) NewCapacity() { |