Home / MCQ Bank / Computer
Computer Sorting Algorithms Difficulty: Medium

The insert() procedure, given below, builds the BST on the input elements, which is the first step of the binary tree sort. Choose the correct to fill the condition. void insert(Tree* node, int newElement) { if(node== NULL) { node = createNewNode(); node-> value = newElement; node -> left = NULL; node -> right = NULL; return; } else if(__________________) { insert(node->left, newElement); } else { insert(node->right, newElement); } }

Select the correct option to test your answer:

More Computer Questions

Gzip is not fully supported by . . . . . . . . What is the utility of Tally Vault Password Which Hadoop configuration property is used to define the location of the Kerberos keytab file? What will be the output of the following program? public class Test{ public static void main(String args[]){ int i = 0, j = 5 ; for( ; (i < 3) && (j++ < 10) ; i++ ){ System.out.print(" " + i + " " + j ); } System.out.print(" " + i + " " + j ); } } What will be the output of the following C++ code? #include <iostream> #include <functional> #include <numeric> using namespace std; int myfunction (int x, int y) { return x + 2 * y; } struct myclass { int operator()(int x, int y) { return x + 3 * y; } } myobject; int main () { int init = 100; int numbers[] = {10, 20, 30}; cout << accumulate(numbers, numbers + 3, init); cout << endl; }