finish the ex-1.c for bitree