Driver code
int main ( ) { int arr [ ] = { 512 , 330 , 78 , 11 , 8 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; if ( canRepresentNLevelBST ( arr , n ) ) cout << " Yes " ; else cout << " No " ; return 0 ; }