Company: UKG_29thjuly
Difficulty: medium
What is the cost of the minimum spanning tree in this graph? (Note: The graph image is missing, but based on the provided key, determine the most appropriate conclusion.)
Given prefix expression a = +12345 and postfix expression b = 122345 + *. Which of the following is true?
The string S is initially empty. The following can be performed on S any number of times: Append any character to S for a cost of 1 point. Copy any substring of S that ends at the current rightmost character and append it to S for a cost of 5 points. What is the minimum cost to construct the string "abhibh"?
An array of 8 elements was sorted using some sorting algorithm. The algorithm found the largest number first. After 4 iterations, the array is [2, 4, 5, 7, 8, 1, 6, 3]. Which statement is true?
What will be the output of the following code? INTEGER n = 10; STACK s; while (n > 0) { s.push(n); n = n - 1; } while (!s.empty()) { PRINT s.pop(); }
In the following postfix expression, what are the values of the top and bottom of the stack before the second "*" operation is performed? 6 3 * 2 7 / 3 2 1 + + * +
An inversion in array 'a' is a distinct pair of indices where i a[j]. How many inversions are in a = [5, 7, 9, 2, 3, 12, 8, 4]?
What is the result of the SQL statement SELECT ROUND(45.926, -2) FROM DUAL;
Given the hash function provided in the description (computing forward and backward passes), which of the following pairs will have the same hash value?
Given array [6, 7, 9, 7, 15, 83, 51, 13, 30]. The array is sorted using the quick sort algorithm with the first element as the pivot. After applying the partition algorithm, what is the index of the pivot element if indexing starts at 0?
A good pair is two adjacent integers whose sum is even. Which of the following arrangements of arr = [1, 0, 9, 12, 13, 3, 15, 6, 13] produces the maximum number of good pairs possible?
Given two integers A and B, convert A to B using the minimum number of operations (Subtract 1 or Multiply by 2). Which list matches the minimum operations for: (1 to 2), (2 to 1), (2 to 10), (10 to 500)?
What is the time complexity of the following code for an input N? for (int i = 0; i < N; i++) { for (int j = 0; j < i; j++) { sum += (i * j); } }