分享丨【题单】位运算(基础/性质/拆位/试填/恒等式/思维) - 力扣(LeetCode)
一、基础题
二、异或(XOR)的性质
三、与或(AND/OR)的性质
Leetcode 3133. 数组最后一个元素的最小值
我的答案与思路:
class Solution {
public:
// 4 --> (100)2 7 --> (0111)2
// 5 --> (101)2 15--> (1111)2
// 6 --> (110)2
// 插入的时候①1 = (1)10 ②10 = (2)10 ③11 = (3)10 ④100 = (4)10 ⑤101 ⑥110 ⑦111
string getBin(int x){
string an