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); }

Want to kickstart your project?Use the new AI Studio to create your code