Well there are a couple of interesting intermediate values here, right? There's tmp.
回去再看第一段代码,那么在这里我该关注什么呢?
tmp The idea was to make a copy of res and temp.
也就是。
So this thing here that starts with slash temp, that's pretty useless information.
错误信息从/tmp开始,其实这是无用信息。
I find something to tmp. And I need to make sure maybe I haven't messed up res.
有tmp,有res,对不对?,我需要对照下tmp,也需要确认下。
It's reasonable because it's meant TMP for temporary purposes just to call it temp or T-M-P for short, X and I can define temp as -- why don't I set it as equal to X, initially, because now that I've stored X in a separate chunk of memory, I can now change its value and then I can say Y gets, not X, but temp, and so now I've actually swapped these values.
这是合理的,因为它是为,暂时的目的,只要叫它Temp或简称它为,我可以定义temp为--为什么我不把它设定为等于,最初的,因为现在我把X存储在一个单独的内存块中,我现在可以改变它的值,然后我说Y等于,不是X,而是temp,所以现在我交换这些值。
应用推荐