[C++] Can anyone help me explain this ? Please!
\tclass Solution {\n\tpublic:\n\t\tint minimumEffort(vector>& tasks) {\n\t\t\tauto comp =  {\n\t\t\t\tint diff1 = abs(a[1] - a[0]);\n\t\t\t\tint diff2 = abs(b[1
\tclass Solution {\n\tpublic:\n\t\tint minimumEffort(vector<vector<int>>& tasks) {\n\t\t\tauto comp = [](vector<int>& a, vector<int>& b) {\n\t\t\t\tint diff1 = abs(a[1] - a[0]);\n\t\t\t\tint diff2 = abs(b[1] - b[0]);\n\t\t\t\treturn diff1 >= diff2;\n\t\t\t};//when I use this to sort, I got an error, but when I deleted the = sign, it works.\n\t\t\t// I really cannot figure this out\n\t\t\tsort(tasks.begin(), tasks.end(),comp);\n\t\t\tint low = 1;\n\t\t\tint hi = INT_MAX;\n\t\t\twhile(low < hi) {\n\t\t\t\tint mid = low + (hi - low) / 2;\n\t\t\t\tif(check(tasks,mid)) {\n\t\t\t\t\thi = mid;\n\t\t\t\t} else {\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn low;\n\t\t}\n\t\tbool check(vector<vector<int>>& tasks, int val) {\n\t\t\tfor(auto& x:tasks) {\n\t\t\t\tif(val >= x[1]) {\n\t\t\t\t\tval -= x[0];\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn val >= 0;\n\t\t}\n\t};
['Binary Tree']