What is the value of the expression: x = (x << 1) - (x << 2)?
Bitshifting 1 to the right by n is equivalent to what?
What is the time complexity of Heap sort in the worst case?
Which of the following is not a practical application of graph coloring?
Which sorting algorithm uses a pivot to sort an array of numeric elements?
If Matrix A is of order X×Y and Matrix B is of order M×N, then what is the order of the Matrix A×B given that Y=M?
What is the time complexity of Depth-First Search (DFS) in terms of the number of vertices (V) and edges (E)?
Consider a situation where you don't have the function to calculate power (pow() function in C) and you need to calculate x^n, where x can be any number and n is a positive integer. What is the best possible time complexity of your power function?
Consider the following code snippet for checking whether a number is the power of 2 or not.
bool isPowerOfTwo(unsigned int x)
{
return (x != 0) && ((x & (x - 1)) == 0);
}
Consider the Quicksort algorithm. Suppose there is a procedure for finding a pivot element that splits the list into two sub-lists, each of which contains at least one-fifth of the elements. Let T(n) be the number of comparisons required to sort n elements. Then: