Company: UKG mcq
Difficulty: medium
Identify which of the following statements is true, with regards to the heap data structure and its role in sorting.
Construct a string of length N using the first K letters of an alphabet. The cost to construct the string is the number of instances where pairs of characters match in position and order. Select the list of answers that matches the costs for: N=9 K=4; N=27 K=5; N=33 K=4.
Which of the following refactoring suggestions is most appropriate for a function that handles data validation, database connection, and UI updates simultaneously?
Which expression is not correct regarding database constraints?
Select the query modifier that does not exist in MySQL.
What will be the value of x after the execution of the following code: int x = 1; for (int i = 1; i <= 128; i += i) { x += x; }
If you want to write a function which would output both to the console screen and to files, which of the prototype would match?
Given prefix expression a = ++x (where x=12345) and postfix expression b = x++ (where x=12345). Which of the following is true:
Which MySQL join type returns records that have matching values in both tables?
Given the hash function: hash += (i+1)*(s[i]-'a'+1). Which of the following pairs will have the same hash value?
Choose the expression that returns 0 (false) in MySQL.
In a virtual memory system that uses the First In First Out (FIFO) page replacement policy, how many page faults will occur? Number of frames = 4. Reference: 1, 2, 3, 4, 5, 1, 3, 1, 2, 5
In a number game, a player selects x and y. The opponent must reduce them to zero using: (x-1, y-2) or (x-2, y-1). What is the strategy to force the opponent to lose?