c++中函数参数做为引用效率会有差距?

记录一下,今天作leetcode的题node 将有序数组转换为二叉搜索树数组 题目连接将有序数组转换为二叉树函数 写了一个二分查找的函数,传递了一个vector向量。代码是这样的:code class Solution { public: TreeNode* __sortedArrayToBST(vector<int>nums,int l,int r) { if(l
相关文章
相关标签/搜索