https://leetcode.com/problems/add-binary/
Given two binary strings, return their sum (also a binary string).
For example, a “11” b “1” Return “100”.
计算过程类似Verilog的全加器。
char* addBinary(char* a, char* b) {int i;int l1, l2, l3, temp;…
https://leetcode.com/problems/power-of-three/
Given an integer, write a function to determine if it is a power of three.
Follow up: Could you do it without using any loop / recursion?
3的次方数没有显著的特点,最直接的方法就是不停地除以3&…