mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-20 05:09:31 +08:00
Add cpp codes for the chapter
computational complexity, sorting, searching.
This commit is contained in:
@ -25,7 +25,7 @@ struct ListNode {
|
||||
* @param list
|
||||
* @return ListNode*
|
||||
*/
|
||||
ListNode* vectorToLinkedList(vector<int> list) {
|
||||
ListNode* vectorToLinkedList(vector<int>& list) {
|
||||
ListNode *dum = new ListNode(0);
|
||||
ListNode *head = dum;
|
||||
for (int val : list) {
|
||||
|
Reference in New Issue
Block a user