# implementation of a list as a static data structure #The list of names is held in an array of length 10 #function to determine the length of a list def length(names): itemsInList = 0 for i in range(maxSize): if names[i] != "": itemsInList = itemsInList + 1 return itemsInList def add(item): if length(names) == maxSize: print("list full") else: i = 0 if length(names) > 0: while i < length(names) and names[i] < item: i = i + 1 #endwhile print("i=",i, " length(names) ",length(names)) for j in range (length(names),i,-1): print("j = ",j, names[j]) names[j] = names[j-1] #endfor names[i] = item #endif #endif def remove(item): i = 0 if length(names) == 0: print("List empty") else: while i <= length(names) and names[i] < item: i = i + 1 if names[i] == item: print(i, names[i]) if length(names)