数据结构与算法学习--线性
数组
class myArray:
def __init__(self, capacity):
self._data = []
self._capacity = capacity
def __getitem__(self, index):
return self._data[index]
def __setitem__(self, index, value):
self._data[index] = value
原创
2022-05-12 21:11:53 ·
183 阅读 ·
0 评论