题解 | #二进制插入#
二进制插入
http://www.nowcoder.com/practice/30c1674ad5694b3f8f0bc2de6f005490
import java.util.*;
public class BinInsert { public int binInsert(int n, int m, int j, int i) {
//1024 0100 0000 0000
//19 0001 0011
//2 0000 0010
//6 0000 0101
// m左移j位
m <<= j;
return n | m;
}
}