An classic interview problem I met in intel interview today.
new file:   find_k.cpp