c++中函數參數做爲引用效率會有差距?

記錄一下,今天作leetcode的題node 將有序數組轉換爲二叉搜索樹數組 題目連接將有序數組轉換爲二叉樹函數 寫了一個二分查找的函數,傳遞了一個vector向量。代碼是這樣的:code class Solution { public: TreeNode* __sortedArrayToBST(vector<int>nums,int l,int r) { if(l
相關文章
相關標籤/搜索