面試題整理和彙總

【1】ArrayList 和LinkedList (1)ArrayList是實現了基於動態數組的數據結構,LinkedList基於鏈表的數據結構 (2)對於隨機訪問get和set,ArrayList覺得優於LinkedList,因爲LinkedList要移動指針。 (3)對於新增和刪除操作add和remove,LinedList比較佔優勢,因爲ArrayList要移動數據。 【2】B樹 (1)一顆
相關文章
相關標籤/搜索