Add cpp codes for the chapter

computational complexity, sorting, searching.
This commit is contained in:
Yudong Jin
2022-11-27 04:20:30 +08:00
parent 431a0f6caf
commit 19a4ccd86a
32 changed files with 1362 additions and 52 deletions

View File

@ -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) {