soulmachine / leetcode

LeetCode题解,151道题完整版。
BSD 3-Clause "New" or "Revised" License
11.27k stars 3.43k forks source link

Difference between p == nullptr and !p #52

Open billlipeng opened 9 years ago

billlipeng commented 9 years ago

Suppose p is a pointer. The running time for if(p==nullptr) and if(!p) are different in Leetcode. Is this a bug in Leetcode.