Data Structure of Berkeley(1)

List

Store a list of ints as an array.

Disadvantages of array.

Insert item of beginning or middle

take time proportional to length of array

Arrats have a fixed length.

LINKED LISTS(a recursive......

继续阅读

Data Straucture of Berkeley(0)

Array

char c[];//引用一个任意长度的字符数组

c=new char[4];

c[0]='b';

c[1]='l';

c[2]='u';

c[3]='e';

c[4]='s';//runtime error 编译时没有问题运行时出现问题

int l= c.length//获得数组的长度,这里.length是一个域,如果为string.length 则一个为方法。filed和meth......

继续阅读