Generation

generate functionTue, 16 May 2023

display full binary tree

void display(int arr[], int start, int end) { if (start > end) return; display(arr, start * 2 + 1, end); cout << arr[start] << " "; display(arr, start * 2 + 2, end); }

Questions about programming?Chat with your personal AI assistant