Category: code
Bilinear Interpolation (BI) is a very useful mathematical approach that you can use to estimate any given value in a two dimensional grid. If you don’t like Matlab (me …
Here is another nice coding exercise from Leetcode Online Judge: https://oj.leetcode.com/problems/find-minimum-in-rotated-sorted-array/ Assume a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 …
For example, if you want to remove a bit or some bits from a integer (signed or unsigned), you can do this. inline int removeBit(int n, int bit) { …
I have asked a question on stackoverflow: inline int test(int n, int tag, int flag) { if (0 == flag) return ((n & tag) == tag); return ((n & …
Suppose you have a wordpress blog and you want to send a email to say ‘thank you’ to all the people who left good comments (you approved them). You …