Font size
WorksheetsOPJU Assessment Test PRE
Total questions: 63
Worksheet time: 1hrs 7mins
Which of the following data structures can be efficiently implemented using a stack?
Queue
Binary Search Tree
Heap
Graph
What is the output of the following code?
0
1
2
Attribute error
Which of the following highly uses the concept of an array?
Binary Search tree
Caching
Spatial locality
Scheduling of Processes
Convert the equivalent expression to prefix
-+/abc+d*ef
/+-abcd+*ef
-/+abc+*def
/-+abc+d*ef
What is the outcome of the prefix expression?
18
17
25
26
What is the time complexity of the following code snippet in C++?
O(n)
O(n2)
O(logn)
O(nlogn)
What is the post order traversal for the given graph?
4,12,10,18,24,22,15,31,44,35,90,66,70,50,25
4,12,10,15,18,24,22,25,31,44,35,66,90,70,50
4,10,12,15,18,22,24,25,31,35,44,50,66,70,90
4,12,10,18,24,22,15,31,44,35,66,90,70,50,25
Answer the following question
O(n)
O(log n)
O(n/2)
O(1)
Find the time complexity of the given code snippet
O(n)
O(n2)
O(nlogn)
O(logn)
Find the time complexity of the given code snippet
O(n)
O(n2)
O(nlogn)
O(n log2 n)
Find the time complexity of given code snippet
O(n2 logn)
O(n3)
O(n log2 n)
O(nlogn)
Suppose you have a circular linked list. How do you find the middle node of the circular linked list efficiently?
Circular linked lists do not have a middle node.
Traverse the entire circular list to count the number of nodes and then find the middle node.
Use two pointers; one moves at twice the speed of the other. When the faster one reaches the end, the slower one will be at the middle node.
Move two pointers from both the end,the node where two pointers meet is the middle node.
How to sort a binary search tree?
Post Order Traversal
Inorder Traversal
Pre order traversal
level order traversal
Which of the following sequences of nodes represents an AVL tree?
A
B
C
D
Which of the following code snippets correctly performs a left rotation on an AVL tree?
Which one of the following is the postorder traversal of the tree?
Consider the following C program.
0, c
0, a+2
‘0’, ‘a+2’
‘0’, ‘c’
A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table, the table is as shown below.
the element in the lowest level is
65
67
69
83
Find the output of the code snippet
20
19
14
17
Which data structure is best suited for implementing a telephone directory?
Stack
Queue
Hash Table
Linked List
Answer the following question
Depth-First Search
Breadth-First Search
Dijkstra's Algorithm
Bellman-Ford Algorithm
Answer the following question
Stack
Queue
Heap
Linked List
Answer the following question
Insertion Sort
Selection Sort
Quick Sort
Merge Sort
Answer the following question
Depth-First Search
Breadth-First Search
Dijkstra's Algorithm
Bellman-Ford Algorithm
Identify the error in the following code that attempts to swap two elements in an array:
The variable temp should be declared as int temp = 0;
The swap function should return the swapped values.
The function call swap(x, y); should be replaced with swap(&x, &y);
The values of x and y are not swapped due to pass-by-value.
Find the error in the following code that attempts to implement a binary search algorithm:
The condition in the while loop should be low < high.
The variable mid should be calculated as mid = (low + high) // 2 + 1
The comparison arr[mid] < target should be arr[mid] > target.
The function should return mid + 1 instead of mid when the target is found.
What will be the output of the code?
1
2
3
null
What should be added in place of "Missing line" to return the sum of digits for the given number?
return n % 10;
return n / 10;
return n + sumOfDigits(n / 10);
return sumOfDigits(n % 10);
What should be added in place of "Missing line 1" to push the value onto the stack, and what should be added in place of "Missing line 2" to pop and return the value from the stack?
Missing line 1: stackArray[++top] = value; | Missing line 2: return stackArray[top--];
Missing line 1: stackArray[top++] = value; | Missing line 2: return stackArray[top];
Missing line 1: stackArray[++top] = value; | Missing line 2: return stackArray[top++];
Missing line 1: stackArray[top--] = value; | Missing line 2: return stackArray[top];
In the first 10 overs of a cricket game, the run rate was only 3.2. what should be the run rate in the remaining 40 overs to reach Target of 282 runs ?
6.25
6.5
6.75
7
Two trains running in opposite directions cross a man standing on the platform in 27 seconds and 17 seconds respectively and they cross each other in 23 seconds. The ratio of their speed is :
1:3
3:2
3:4
None of these
Mr. Thomas invested an amount of RS. 13,900 divided in two different schemes A and B at the simple interest rate of 14% p.a and 11% p.a respectively. If the total amount of simple interest earned in 2 years be RS. 3508, what was the amount invested in scheme B ?
RS. 6400
RS. 6500
RS. 7200
RS. 7500
In a certain store, the profit is 320% of the cost. If the cost increased by 25% but the selling price remains constant, approximately what percentage of the selling Prices is the profit?
30%
70%
100%
25%
Two students appeared at an examination. One of them secured 9 marks more than the other and his mark was 56% of the sum of their marks. The marks obtained by them are :
39,30
41,32
42,33
43,34
On 8th December, 2007 Saturday falls. What day of the week was it on 8th December,2006?
Sunday
Thursday
Friday
Tuesday
How many of the following numbers are divisible by 132?
264,396,462,792,968,2178,5184,6336
4
5
6
7
Six bells commence tolling together and till at intervals of 2,4,6,8,10 and 12 seconds respectively. In 30 minutes, how many times do they toll together?
4
10
15
16
There are two examinations rooms A and B. If 10 students are sent from A to B, then the number of students in each is the same. If 20 candidates are sent from B to A, then the number of students in A is double the number of students in B. The number of students in room A is :
20
80
100
200
A boat can travel with a speed of 13 km/hr in still water. If the speed of the stream is 4 km/hr, find the time taken by the boat to go 68 km downstream.
2 hours
3 hours
4 hours
5 hours
A trader owes a merchant RS. 10,028 due 1 year hence. The trader wants to settle the account after 3 months. If the rate of interest 12 % per annum, how much cash should he pay ?
RS. 9025.20
RS. 9200
RS. 9600
RS. 9560
Find the odd man out.
10,25,45,54,60,75,80
10
45
54
75
Excluding stoppages, the speed of a bus is 54kmph and including stoppages, it's 45 kmph. For how many minutes does the bus stop per hour?
9
10
12
20
A,B and C can do a piece of work in 20, 30 and 60 days respectively. In how many days can A do the work if he is assisted by B and C on every third day ?
12 days
15 days
16 days
18 days
There is 60% increase in an amount in 6 years at simple interest. What will be the compound interest of RS. 12,000 after 3 years at the same rate?
RS.2160
RS. 3120
RS. 3972
RS. 6240
A is two years older than B who is twice as old as C. If the total of the ages of A,B and C be 27, then how old is B?
7
8
9
10
How many times are hands of a clock at right angle in a day ?
22
24
44
48
A sum of money is to be distributed among A,B,C,D in the proportion of 5: 2: 4: 3. If C gets RS. 1000 more than D, what is B's share ?
RS. 500
RS. 1500
RS. 2000
None of theses
In what ratio must a grocery mix two varieties of pulses costing RS. 15 and RS. 20 per kg respectively so as to get mixture worth RS. 16. 50 kg ?
3: 7
5:7
7:3
7: 5
A two digit number is such that the product of the digits is 8. When 18 is added to the number, then the digits are reversed. The number is
18
24
42
81
I love the game of basketball, however, I don't play it myself.
NO CHANGE
basketball: however,
basketball however,
basketball; however,
The tribe was left without food for weeks the members had no choice but to resort to cannibalism.
NO CHANGE
weeks, the
weeks; the
weeks--the
The guy, cleaning the room, is the handyman for our whole school.
NO CHANGE
guy cleaning the room is
guy (cleaning the room) is
guy--cleaning the room-- is
When I turn sixteen I'm going to buy a car.
NO CHANGE
sixteen, I'm
sixteen; I'm
sixteen--I'm
Students who work hard will ace the ACT.
NO CHANGE
Students, whom work hard,
Students who work hard,
Students, who work hard,
Ready for the journey of a lifetime the boy hopped on the spaceship.
NO CHANGE
lifetime; the
lifetime, the
lifetime: the
Stephen King's first novel, Carrie, was a surprise success.
NO CHANGE
novel Carrie was
novel. Carrie was
novel Carrie, was
It was early morning when my sisters and I arrived, at the spa for our facials and massages.
NO CHANGE
my sisters' and I arrived
my sisters and I arrived
my sisters' and I arrived,
In the more than two thousand years since the birth of Jesus millions of believers have traveled to the Holy Land on religious pilgrimages.
NO CHANGE
since the birth of Jesus, millions
since, the birth of Jesus, millions
since, the birth of, Jesus millions
I always carry two items, a wallet and a phone.
NO CHANGE
items; a wallet
items: a wallet
items a wallet
Enter Your Name
Enter Your Enrolment No
Enter Your Email ID
