Not printing anything
use this logic
replace all couts with push_back
this will work
and for submitting it on hackerblocks
sort the vector
and also keep a check for empty vector i.e. no nodes at distance k from it
Please walk me through the process of going to the parent node and then to the other child node. Going down to child nodes is simple.
u first check in left
if it has enough nodes, u check if the distance is correct i.e target it found u push it
similarly for right