ArrayList1 [자료구조] Array로 Linkedlist 구현하기_node 없음 class ArrayList: def __init__(self): self.count= 0 self.current = 0 def move_next(self): # ㄷㅏ음 값으로 이동 if self.current >= self.count: return self.current = self.current + 1 def get(self): # 현재 위치 값 가져오기 if self.current == self.count : return return self.data.get(self.current) def add(self, value): # 현재값의 바로 앞에 값 추가하기 새로운 배열을 만들어서 추가하기 for i in range(self.count-1,self.current,-1): self.data.set(i+.. 파이썬 2023. 5. 24. 이전 1 다음