当前位置:网站首页>20220607 others: sum of two integers
20220607 others: sum of two integers
2022-07-03 10:11:00 【Seeyouagain】
Title Description : Here are two integers a
and b
, Don't use Operator +
and -
, Calculates and returns the sum of two integers .
coded :
public static int getSum(int a, int b) {
int bit = (a & b) << 1;
int result = a ^ b;
if (bit != 0){
return getSum(result,bit);
}
return result;
}
边栏推荐
- Adaptiveavgpool1d internal implementation
- Opencv note 21 frequency domain filtering
- 2021-11-11 standard thread library
- 01 business structure of imitation station B project
- 20220531数学:快乐数
- LeetCode - 1670 设计前中后队列(设计 - 两个双端队列)
- Wireshark use
- Circular queue related design and implementation reference 1
- Leetcode-100: same tree
- Opencv image rotation
猜你喜欢
4.1 Temporal Differential of one step
Leetcode-112: path sum
Flutter 退出当前操作二次确认怎么做才更优雅?
LeetCode - 673. Number of longest increasing subsequences
LeetCode - 5 最长回文子串
[C question set] of Ⅵ
openCV+dlib實現給蒙娜麗莎換臉
QT self drawing button with bubbles
2312. Selling wood blocks | things about the interviewer and crazy Zhang San (leetcode, with mind map + all solutions)
Opencv+dlib to change the face of Mona Lisa
随机推荐
Mise en œuvre d'OpenCV + dlib pour changer le visage de Mona Lisa
4.1 Temporal Differential of one step
20220608其他:逆波兰表达式求值
LeetCode - 706 设计哈希映射(设计) *
Octave instructions
(2) New methods in the interface
4G module designed by charging pile obtains signal strength and quality
Leetcode bit operation
Leetcode - 895 maximum frequency stack (Design - hash table + priority queue hash table + stack)*
Leetcode-112: path sum
Matplotlib drawing
Tensorflow built-in evaluation
Design of charging pile mqtt transplantation based on 4G EC20 module
2.2 DP: Value Iteration & Gambler‘s Problem
Window maximum and minimum settings
Leetcode - 1670 design front, middle and rear queues (Design - two double ended queues)
Stm32 NVIC interrupt priority management
Leetcode 300 最长上升子序列
pycharm 无法引入自定义包
LeetCode 面试题 17.20. 连续中值(大顶堆+小顶堆)