mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-20 13:12:43 +08:00
Add cpp codes for the chapter
computational complexity, sorting, searching.
This commit is contained in:
@ -23,7 +23,7 @@ struct TreeNode {
|
||||
* @param list
|
||||
* @return TreeNode*
|
||||
*/
|
||||
TreeNode* vectorToTree(vector<int> list) {
|
||||
TreeNode* vectorToTree(vector<int>& list) {
|
||||
TreeNode *root = new TreeNode(list[0]);
|
||||
queue<TreeNode*> que;
|
||||
que.emplace(root);
|
||||
|
Reference in New Issue
Block a user