mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-12 18:10:42 +08:00
Add Python codes for the chapter
of array and linked list.
This commit is contained in:
@ -20,12 +20,12 @@ class MyList {
|
||||
nums = new int[initialCapacity];
|
||||
}
|
||||
|
||||
/* 获取列表容量 */
|
||||
/* 获取列表长度(即当前元素数量)*/
|
||||
public int size() {
|
||||
return size;
|
||||
}
|
||||
|
||||
/* 获取列表长度(即当前元素数量) */
|
||||
/* 获取列表容量 */
|
||||
public int capacity() {
|
||||
return nums.length;
|
||||
}
|
||||
|
Reference in New Issue
Block a user