Font size
WorksheetsMock Batch-III
Total questions: 62
Worksheet time: 2hrs 30mins
A car moves for 2 hours at a speed of 25 km/h and another car moves for 3 hours at the same speed. Find the ratio of distances covered by the two cars.
5:2
2:3
1:3
7:3
Without stoppage, a train travels at an average speed of 75 km/h and with stoppages it covers the same distance at an average speed of 60 km/h. How many minutes per hour does the train stop?
10 min
12 min
14 min
18 min
Walking at ¾ of his normal speed, Abhishek is 16 minutes late in reaching his office. The usual time taken by him to cover the distance between his home and office is
48 minutes
60 minutes
42 minutes
62 minutes
The speed of a train is 90 kmph. What is the distance covered by it in 10 minutes?
15 km
12 km
10 km
5 km
A car covers a distance of 450m in 90 secs. What is the speed in km/hr?
18
20
5
10
A person do rock climbing at an altitude of 800 m. He go up by 7 mph. and come down by 9 mph. what was his average speed
7.8 mph
8.2 mph
10 mph
12 mph
A rider travels ‘m' miles in 'h' hours and 'n’ minutes. What is the speed of the bike in miles per hour?
60/(60h+m)
60/(60m+n)
m/(60h+n)
60m/(60h+n)
The distance from the pavilion to me food court on me map is 3.5 cm If map is of the scale 1 cm = 10 m, what is the actual distance?
25 m
36 m
35 m
40 m
A and B travel the same distance at the rate of 8 km/h and 10 km/h respectively. If A takes 30 minutes longer than B, the distance travelled by B is?
6 km
10 km
16 km
20 km
Ratio between speeds of 2 trains is 5:3. If the first train runs 350 km in 2 hours, then what is the speed of the second train?
100 kmph
115 kmph
105 kmph
210 kmph
The difference between the local value and face value of 7 in the numeral 657903 is
0
7896
6993
903
The sum of three prime numbers is 100. If one of them exceeds another by 36, then one of the numbers is
7
29
41
67
5b2 is a three-digit number with b as a missing digit. If the number is divisible by 6, the missing digit is
2
3
6
7
The least number which must be subtracted from 6709 to make it exactly divisible by 9 is
2
3
4
5
The largest natural number which exactly divides the product of any four consecutive natural numbers is
6
12
24
120
The number 311311311311311311311 is
divisible by 3 but not by 11
divisible by 11 but not by3
divisible by both 3 and 11
neither divisible by 3 nor by 11
The value of P, when 4864 x 9P2 is divisible by 12, is
2
5
8
none of these
How many of the following numbers are divisible by 3 but not by 9?
2133, 2343, 3474, 4131, 5286, 5340, 6336, 7347, 8115, 9276
5
6
7
none of these
The sum of three consecutive odd numbers is always divisible by:
I. 2 II. 3 III. 5 IV. 6
Only I
Only II
Only I and II
Only II and IV
(51+52+53+………+100) is equal to
2525
2975
3225
3775
A number when divided successively in order by 4, 5 and 6. The remainders were respectively 2, 3 and 4. The number is
214
476
954
1908
A number when divided b the sum of 555 and 445 gives two times their difference as quotient and 30 as the remainder. The number is
1220
1250
22030
220030
When a number is divided by 31, the remainder is 29. When the same number is divided by 16, what will be the remainder?
11
13
15
Data inadequate
A number when divided by 6 leaves a remainder 3. When the square of the same number is divided by 6, the remainder is
0
1
2
3
Find the missing number in the series given below:
120, _, 60, 20, 5, 1
60
120
100
80
Find the next number in the series given below:
4, 14, 38, 82, 152,_
176
188
220
254
Find the next letter in the series given below:
B,I,OT,X,A,C,_
E
F
D
G
Find the next letter in the series given below:
CIRCULAR, IRCULA, RCUL, _
CU
UC
RU
UL
Find the next letter in the series given below:
PL, QN, RP, SR
TS
TT
US
UT
In the following question, find out the alternative which will replace the question mark:
8: 32:: 14: ?
72
88
86
98
Identify the last node in the post-order traversal of this binary tree.
8
1
9
5
If we use sequential representation of binary tree, a node at position i will have its left child at ______________
i/2
i+1
2*i
2*i*2
If the root of a BST has 16 as the key, then the key element 31 should be inserted in the _____________
right sub-tree of root
left sub-tree of root
either left sub-tree of right sub-tree of the root
The MAX-HEAPIFY function will swap the parent node with the ________ child node on a mismatch.
larger
smaller
left
right
The running time of MAX-HEAPIFY function is
O(n)
O{n^2)
O(logn)
O(nlogn)
If the in-order and post-order traversals of a binary tree are given as 2, 3, 4, 5, 6, 7, 8, 9 and 3, 2, 5, 7, 6, 9, 8, 4 respectively, identify the root.
4
5
9
8
Which SQL keyword is used to retrieve only unique values from a column?
DISTINCT
UNIQUE
LIMIT
GROUP BY
What does the INNER JOIN operation return?
a) All rows from the left table
All rows from the right table
Rows that have matching values in both tables
Non-matching rows from both tables
Given the following SQL query, what will be the result of the subquery?
SELECT * FROM employees WHERE salary > (SELECT AVG(salary) FROM employees);
All employees with salaries less than the average
All employees with salaries greater than the average
An error
Which command is used to remove all rows from a table but keep the structure intact?
DELETE
DROP
TRUNCATE
REMOVE
Which of the following SQL clauses is used to specify the conditions under which a group is included in the result set of a GROUP BY statement?
(a)
What is the effect of using RANK() in a SQL query as opposed to ROW_NUMBER()?
RANK() skips ranks when there are ties, while ROW_NUMBER() does not.
ROW_NUMBER() skips ranks when there are ties, while RANK() does not.
Both RANK() and ROW_NUMBER() produce identical results.
RANK() and ROW_NUMBER() can be used interchangeably without any difference.
Which of the following SQL queries would return duplicate rows in its result set?
SELECT * FROM products;
SELECT DISTINCT * FROM products;
SELECT product_id, COUNT(*)
FROM products
GROUP BY product_id;
SELECT * FROM products GROUP BY product_id;
Which query returns the total sales amount for each product but includes only products where the total sales exceed $1000?
SELECT product_id, COUNT(amount)
FROM sales
GROUP BY product_id
HAVING COUNT(amount) > 1000;
SELECT product_id, SUM(amount)
FROM sales
WHERE SUM(amount) > 1000
GROUP BY product_id;
SELECT product_id, SUM(amount)
FROM sales
GROUP BY product_id
HAVING SUM(amount) > 1000;
SELECT product_id, SUM(amount)
FROM sales
GROUP BY product_id
WHERE SUM(amount) > 1000;
What is the purpose of a window function in SQL?
To perform row-level operations.
To apply aggregate functions over a specified range of rows.
To calculate the number of rows in a table.
To delete rows in a partitioned query.
Which SQL query will return the second-highest salary from the employees table?
SELECT MAX(salary)
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);
SELECT MAX(salary)
FROM employees
ORDER BY salary DESC
LIMIT 1, 1;
SELECT salary
FROM employees
ORDER BY salary DESC
LIMIT 1 OFFSET 1;
SELECT salary
FROM employees
WHERE salary < MAX(salary);
Which SQL statement is used to remove duplicate records from a result set?
SELECT DISTINCT
SELECT UNIQUE
SELECT ALL
SELECT GROUP BY
What is the result of using the COUNT() function in a SQL query?
It returns the total number of rows in a table.
It returns the number of distinct values in a column.
It returns the sum of a numeric column.
It returns the average of a numeric column.
Which SQL statement is used to update existing records in a table?
UPDATE
MODIFY
SET
CHANGE
Which SQL function is used to calculate the average value of a numeric column?
SUM()
AVG()
COUNT()
MEDIAN()
What is the purpose of the GROUP BY clause in SQL?
To filter records based on a condition
To aggregate data across multiple rows
To sort the result set
To join two tables
Which SQL statement is used to create a new table in a database?
CREATE TABLE
NEW TABLE
ADD TABLE
INSERT TABLE
What is the function of the ORDER BY clause in SQL?
To filter records based on a condition
To sort the result set in a specified order
To group records with similar values
To limit the number of records returned
Which SQL statement is used to remove a table from a database?
DELETE TABLE
DROP TABLE
REMOVE TABLE
ALTER TABLE
What does the COALESCE() function do in SQL?
It returns the first non-null value in a list of arguments.
It counts the number of non-null values in a column.
It concatenates two or more strings.
It converts a value to a specified data type.
What is the purpose of the JOIN operation in SQL?
To combine rows from two or more tables based on a related column.
To filter records based on a specific condition.
To create a new table from existing tables.
To delete records from a table.
In dynamic programming, the technique of storing the previously calculated values is called ___________
Saving value property
Storing value property
Memorization
Mapping
Consider the two strings “”(empty string) and “abcd”. What is the edit distance between the two strings?
0
3
4
None of the above
What are 2 things required in order to successfully use the dynamic programming technique?
Optimal sub structure and overlapping sub problems
A problem that can’t be sub divided and is complex
Non overlapping sub problems and intervals
Recursion and a problem that is complex
Dynamic Programming is often used for (choose all that apply):
Optimization problems that involve making a choice that leave one or more subproblems to be solved.
Problems previously solved using divide and conquer that have over lapping subproblems
Non polynomial solution problems
Subproblems where resources are shared
First Recurring Character in a String Problem Statement: Given a string, identify the first character that appears more than once. If no character appears more than once, return -1.
Input:
● The first line contains a string of lowercase alphabets.
Output:
● Output the first recurring character or -1 if no such character exists.
Sample
Test Cases:
Test Case 1:
● Input: abca
● Output: a
● Explanation: The first recurring character is a.
Test Case 2:
● Input: abcdef
● Output: -1
Clone a Stack Without Extra Space Problem Statement: Given a stack, clone the stack without using extra space. You should implement this without using any other data structures such as arrays or lists.
Input:
● The input consists of a stack of integers.
Output:
● Output the cloned stack. Sample Test Cases:
Test Case 1:
● Input:
5 4 3 2 1
● Output: 5 4 3 2 1
● Explanation: The stack is cloned, so the output is the same as the input.
Test Case 2:
● Input: 7 6 5
● Output: 7 6 5
