# [2020q3 Homework4 (quiz4)](https://hackmd.io/@sysprog/2020-quiz3) contributed by < `zhu849` > ## 測驗 `1` * 從題目給的例子不難發現,立方體上任意一點到鄰近一點會改變其中一個 bit(Hamming distance 會是一),所以要得到確切的 Hamming distance 僅需透過 `^` 就可以得到兩點間最短的路徑,所以選 `^` operation ==OP== `(a)` `|` `(b)` `&` ***`(c)` `^`*** `(d)` `+` `(e)` `-` ## 測驗 `2` * 由 Line 11 得知我們需要 parent 去指向父節點,且 parent 是指向一個指標的陣列,所以我們應該要使用指標的指標去指向它,因此 `AAA` 選 `b` * * 從 line 39 可以知道 ==AAA== `(a)` `int ***parent` ***`(b)` `int **parent`*** `(c)` `int *parent` ==BBB== `(a)` `(-2)` `(b)` `(-1)` `(c)` `0` `(d)` `1` `(e)` `2` ==CCC== `(a)` `1` `(b)` `i` `(c)` `i >> 1` `(d)` `i >> k` `(e)` `k<< i` `(f)` `1 << i` ## 測驗 `3` ## 測驗 `4`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up