text: Search key in BST : find Node and its parent .
code: while ( ptr != null ) { if ( dkey == ptr . info ) { found = 1 ; break ; } par = ptr ; if ( dkey < ptr . info ) { if ( ptr . lthread == false ) ptr = ptr . left ; else break ; } else { if ( ptr . rthread == false ) ptr = ptr . right ; else break ; } } if ( found == 0 ) Console . Write ( " dkey ▁ not ▁ present ▁ in ▁ tree STRNEWLINE " ) ;