C++ unsequenced modification and access

处理LeetCode的4Sum问题中遇到的:
unsequenced modification and access
正确版本:

while(left < --right && nums[right] == nums[right+1]);

错误版本:

while(left < right && nums[--right] == nums[right+1]);

你可能感兴趣的:(C++ unsequenced modification and access)