17.4 Write a method which finds the maximum of two numbers. You should not use if-else or any other comparison operator. 这道题让我们找出两个数中的较大值,不能用if..else..语句判断,也不能用任何比较符号.那么我们怎么办呢,我们看两个数的差值a-b是否大于0,如果大于0,说明a大,如果小于0,说明b大.然后我们用一个变量k来记录a-b的符号位,用q来表示k的相反数,这样
Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: Input: 1 \ 3 / 2 Output: 1 Explanation: The minimum absolute difference is 1, which is the difference between 2 and 1