当前位置:网站首页>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;
}
边栏推荐
- LeetCode - 895 最大频率栈(设计- 哈希表+优先队列 哈希表 + 栈) *
- YOLO_ V1 summary
- STM32 running lantern experiment - library function version
- LeetCode - 900. RLE 迭代器
- RESNET code details
- 20220602数学:Excel表列序号
- LeetCode - 919. Full binary tree inserter (array)
- Retinaface: single stage dense face localization in the wild
- CV learning notes - Stereo Vision (point cloud model, spin image, 3D reconstruction)
- 4G module board level control interface designed by charging pile
猜你喜欢
CV learning notes - clustering
openCV+dlib實現給蒙娜麗莎換臉
3.3 Monte Carlo Methods: case study: Blackjack of Policy Improvement of on- & off-policy Evaluation
Basic knowledge of communication interface
MySQL root user needs sudo login
CV learning notes - camera model (Euclidean transformation and affine transformation)
LeetCode - 673. Number of longest increasing subsequences
Deep learning by Pytorch
Connect Alibaba cloud servers in the form of key pairs
CV learning notes alexnet
随机推荐
2021-11-11 standard thread library
Discrete-event system
Leetcode 300 longest ascending subsequence
20220604数学:x的平方根
openCV+dlib实现给蒙娜丽莎换脸
openEuler kernel 技術分享 - 第1期 - kdump 基本原理、使用及案例介紹
El table X-axis direction (horizontal) scroll bar slides to the right by default
Tensorflow2.0 save model
Leetcode - 1670 design front, middle and rear queues (Design - two double ended queues)
Anaconda安装包 报错packagesNotFoundError: The following packages are not available from current channels:
Leetcode-106:根据中后序遍历序列构造二叉树
LeetCode - 1670 设计前中后队列(设计 - 两个双端队列)
openEuler kernel 技术分享 - 第1期 - kdump 基本原理、使用及案例介绍
Development of intelligent charging pile (I): overview of the overall design of the system
[combinatorics] combinatorial existence theorem (three combinatorial existence theorems | finite poset decomposition theorem | Ramsey theorem | existence theorem of different representative systems |
Leetcode - 460 LFU cache (Design - hash table + bidirectional linked hash table + balanced binary tree (TreeSet))*
LeetCode - 900. RLE 迭代器
4G module board level control interface designed by charging pile
On the problem of reference assignment to reference
Cases of OpenCV image enhancement