A man can row with a speed of 12 kmph in still water. If the stream flows at 4 kmph, then the speed downstream is?
If a number is chosen at random from the set {11,12,13,14,...99},then the probability that the chosen number is a perfect square is:
The ratio in which the price at Rs 7.20 a kg be mixed with rice at Rs 5.70 a kg to produce a mixture worth Rs 6.30 a kg is:
What is the synonym of the word 'pitcher'?
Assertion (A): Plants are green.
Reason (R) : Plants contain chlorophyll which gives it the color green.
Find the odd one out.
Banquet, Carnival, Ravenous, Merry -making.
P: An arbitrary Directed Acyclic Graph(DAG) G=(V,E) is given as an adjacency list. Topological sort: the vertices of G can be completed in linear time?
Q: In the merge-sort execution tree, roughly the same amount of work is done at each level of the tree
Consider the following recursive implementation of the given problem
What will be the X and Y ?
Schema I: Registration (rollno, courses)
Field ‘courses’ is a set-valued attribute containing the set of courses a student has registered for.
Non-trivial functional dependency: rollno → courses
Schema II: Registration (rollno, courseid, email)
Non-trivial functional dependencies:
rollno, courseid → email
email → rollno
Schema III: Registration (rollno, courseid, marks, grade)
Non-trivial functional dependencies:
rollno, courseid → marks, grade
marks → grade
Schema IV: Regstration (rollno, courseid, credit)
Non-trivial functional dependencies:
rollno, courseid → credit
courseid → credit
Which one of the relational schemas above is in 3NF but not in BCNF?
Course_Id
|
Course_Title
|
Course_Fee
|
C01
C02
C03
C04
|
Oracle
Java
C++
Oracle
|
8000
5000
4000
7000
|
What is the output of the following SQL query?
SELECT Count (*)
FROM (
(SELECT Course_Id, Course_Title
FROM Student) AS S
NATURAL JOIN
(SELECT Course_Title, Course_Fee
FROM Student) AS T
);
[MSQ]
Choose the correct option: [MSQ]
Choose the correct option: [MSQ]
If AB = C, then find the matrix A^2.
Choose the correct option: [MSQ]
If u1 and u2 are column matrices such that
[MSQ]
Find its maximum height.
class GATE:
def _enter_(self):
print("Inside the Quiet Zone!")
return 456
def _exit_(self, exc_type, exc_value, tb):
print("Exiting the Quiet Zone!")
return False
with GATE() as data:
print(data)
raise ValueError("Intrusion detected!")
print("Will this get printed?")
import heapq
data = [(-1, "task1"), (-3, "task3"), (0, "task2"), (-2, "task4")]
heapq.heapify(data)
while data:
print(heapq.heappop(data)[1], end=" ")
def GATE(instance):
return f"Generated method executed by {instance.attribute}!"
GeneratedClass = type(
"GeneratedClass",
(object,),
{"_init_": lambda instance, value: setattr(instance, "attribute", value),
"execute_method": GATE}
)
instance_obj = GeneratedClass("CodeMaster")
print(instance_obj.execute_method())
from itertools import permutations
import numpy as np
def matrix_permutations(matrix):
perms = permutations(matrix)
max_sum = float('-inf')
for perm in perms:
perm_matrix = np.array(perm).reshape(3, 3)
perm_sum = np.sum(np.diag(perm_matrix))
max_sum = max(max_sum, perm_sum)
return max_sum
matrix = [1, 2, 3, 4, 5, 6, 7, 8, 9]
print(matrix_permutations(matrix))