Test Questions - Recruitment Test - AFGT02 Courseware - Arbisoft Fresh Grad Online Test - 2020
Test Questions - Recruitment Test - AFGT02 Courseware - Arbisoft Fresh Grad Online Test - 2020
You are taking "Recruitment Test" as a timed test. The timer End Test 0:45:17
on the right shows the time remaining in the test. To receive
credit for problems, you must select "Submit" for each
problem before you select "End Test".
Test Questions
Searching in a BST
Suppose that we have numbers between 1 and 100 in a binary search tree and we
want to search for the number 10. Which of the following sequences could not be the
sequence of nodes examined ?
Inheritance
What should be the result of running the following pseudocode snippet?
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b1… 1/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
class Class1:
function function_1(self):
print("a")
function function_2(self):
print("b")
class Class2:
function function_1(self):
print("c")
function function_3(self):
print("d")
class Class3:
function function_2(self):
print("e")
function function_3(self):
print("f")
class ClassB(Class2):
function function_2(self):
print("i")
function function_3(self):
print("j")
class ClassC(Class1):
function function_2(self):
print("k")
function function_3(self):
print("l")
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b1… 2/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
ClassA().function_2()
ClassB().function_3()
ClassB().function_3()
Hint: A system is in a safe state if there is a sequence in which all the processes can
be executed without getting into a deadlock.
[1, 4, 3, 5, 2]
[1, 2, 3, 4, 5]
[3, 4, 1, 2, 5]
[3, 5, 2, 4, 1]
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b1… 3/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
Not a topper
You are provided with a tables "Students" with their "name", "score" and respective
"country" in a database.
Students
Maryam,Sohaib,Wadood
Aisha,Nabeel,Sohaib
Nabeel,Noor,Wadood
Aisha,Noor,Sohaib
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b1… 4/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
Make it a palindrome
How many iterations of characters are required to make buqbxwhcob a palindrome
string? Consider alphabets to be a circular list, A comes next to Z
15
79
57
25
Identical Stacks
Each row below are the stacks of water bottles with their respective heights(n)
1. | 1 | 1 | 2 | 3 | 1 |
2. | 2 | 5 | 4 | 1 | 5 | 3 | 3 | 2 |
3. | 1 | 4 | 2 | 5 | 2 | 2 |
The rightmost element shows the top of the stack. Adding up the heights of the
bottles on a stack will give you the overall height of the stack. You can pop the bottles
from each stack any number of times to change the height of the stack.
Determine the maximum height of each stack where all of the three stacks are equal
in terms of height.
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b1… 5/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
17
Process Scheduling
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b1… 6/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
Process A
Arrival Time: 0
Execution Time Needed: 1300msec
Process B
Arrival Time: 200msec
Execution Time Needed: 300msec
Process C
Arrival Time: 700msec
Execution Time Needed: 1000msec
There are four main algorithms which our CPU uses to schedule processes:
FCFR: First Come First Serve
SJF: Shortest Job First
SRTF: Shortest Remaining Time First
RR: Round Robin
Hash Clash
An array is used here to represent a Hash Table. Array index starts from 0 and ends at
size_of_array - 1
Which slot would the number 50 hash to, in the following Hash Table?
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b1… 7/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
48 31 41 40 50
size_of_table = 11
Secret Key
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b1… 8/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
The above pseduocode can generate a secret key for you. What would be the output
secret key of the function mySecretKey(20)?
Answer submitted.
0.24
0.19
0.94
0.44
0.72
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b1… 9/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
Submit
Answer submitted.
[6, 58, 42, 11, 30, 26, 17, 23, 21, 20, 18]
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 10/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
Character Analogies
H is to ___ what N is to Z?
Answer submitted.
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 11/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
p0,p3,p1,p4,p2
p0,p3,p4,p2,p1
p0,p3,p2,p1,p4
p0,p3,p2,p4,p1
Customer orders
Find out the Customers (CustomerName, Address) who have placed greater than 40
orders.
Customers Orders
CustomerID OrderID
CustomerName CustomerID
Address ShipperID
City OrderDate
PostalCode
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 12/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
Min Heap
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 13/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
A min-heap is a heap where the value of each internal node is smaller than or equal
to the values of its children. Consider a binary min-heap implemented using an array
as follows: The root is stored in the rst location, a[0], nodes in the next level, from
left to right, is stored from a[1] to a[2]. The nodes from the second level of the tree
from left to right are stored from a[3] location onward... Which one of the following
array represents a binary min-heap?
10, 19, 25, 29, 69, 55, 115, 95, 77, 127, 126, 171, 174, 117, 147
10, 19, 25, 55, 29, 127, 95, 171, 69, 126, 77, 115, 174, 117, 147
10, 19, 25, 29, 69, 77, 95, 115, 55, 127, 126, 171, 174, 117, 147
10, 19, 25, 29, 69, 95, 115, 55, 174, 77, 171, 126, 127, 117, 147
print head.data
head.next = func(head.next, i-1)
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 14/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
10000101
10010101
00011100
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 15/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
We have to balance these storage systems (move items between storages so that
there are equal number of items in both). Keeping in mind the functionalities of
stacks and queues, we have to balance them!
QUEUE STORAGE: oldest [29, 19, 27, 22, 24, 15, 21, 28, 26, 17] newest
What is the newest item in stack storage after balancing the storages?
You can select only one option.
22
15
Employee salaries
Table: employee_age
emp_id age
100 21
103 38
101 28
102 26
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 16/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
Table: employee_salary
emp_id salary
105 49000
102 54000
100 60000
103 45000
SELECT
MIN(eSal.salary)
FROM
employee_age as eAge INNER JOIN employee_salary as eSal
ON
eAge.emp_id = eSal.emp_id
None
49000
54000
60000
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 17/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
What will be the output of this code snippet? (__init__ is constructor of class)
class A:
def __init__(self):
self.calc_i(260)
class B(A):
def __init__(self):
super().__init__()
print("i from B is", self.i)
b = B()
7523
9360
18174
6532
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 18/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
What is the value of N if the mode, mean and median of the list M are equal to each
other? Express your answer to the nearest whole number.
Note:
The mode of a set of data values is the value that appears most often.
The mean is the average of the numbers: a calculated "central" value of a set of
numbers.
83
Answer submitted.
Hint:
If you get more 1's than 0's, John Wick is a doctor.
If you get equal number of 1's and 0's, John Wick is a carpenter.
function foo()
print 1
function soo()
print 0
function zoo()
foo()
soo()
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 19/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
function koo()
foo()
soo()
soo()
function loo()
foo()
foo()
soo()
If the functions run in the following order, tell who is John Wick?
Can you gure out the number of iterations it will take to execute the following input:
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 20/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
function longRunningFunction(array) {
for ( i = 0; i < length(array); i++ ) {
idx = i
for ( j = i + 1; j < length(array); j++ ) {
if ( array[idx] > array[j] ) {
idx = j
}
}
swap( array[i], array[idx] )
}
}
-2
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 21/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
X V
O B
K Q I
jvobxkqi
Answer submitted.
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 22/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
1. After Enqueue(x):
Push(x)
Push(x mod 3)
2. After x = Dequeue():
y = Pop()
Push(x + y)
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 23/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
Novel Arrangement
Anaya has three Urdu novels (F, D, A) and Four English novels (C, B, E, G). She wants
to arrange her novels in a way that following conditions must be met:
C, A, G, D, B, F, E
D, A, B, G, E, F, C
E, F, B, A, G, D, C
G, D, C, A, B, F, E
Max Heap
What will be the max heap of the following heap:
[48, 48, 3, 5, 42, 37, 34, 16, 31]
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 24/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
Graph adjacency
If we represent the following undirected graph in adjacency matrix M what would be
the sum of 1st row of M.
NOTE: Counting starts from 0 as (0th, 1st, 2nd, 3rd, 4th, 5th ...)
1 76
22 3
1
0 9 5
10 31
4
2 64
32
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 25/26
1/25/2020 Test Questions | Recruitment Test | AFGT02 Courseware | Arbisoft Fresh Grad Online Test - 2020
83
77
107
Answer submitted.
Pro t Issues
A, B and C enter into a partnership with an investment in which A's contribution is
$12000. if out of a total pro t of $1100, A and B get $400 and $100 respectively, then
what is C's capital?
17800.0
18000.0
18050.0
18350.0
Answer submitted.
https://test.arbisoft.com/courses/course-v1:ArbisoftX+AFGT02+2020_T1/courseware/9b9a35edffc24bbda53e71e38d72624f/b8a6c7eeaf5049cfa43b… 26/26