NEW
Font size
WorksheetsQUIZ
Total questions: 25
Worksheet time: 6hrs 15mins
1. You want to create a form in HTML. Which of the following tags is used to group together form controls such as inputs and labels?
<div>
<form>
<fieldset>
<section>
Which of the following conditions must hold true for a binary tree to be a valid Binary Search Tree (BST)?
1) The left subtree of a node contains values greater than the node
2) The right subtree of a node contains values less than the node
3) The left and right subtrees must be valid BSTs
Only 1
Only 3
Both 2 and 3
Both 1 and 3
Which sorting algorithm is best suited for sorting nearly sorted data (or data that is mostly sorted)?
Insertion Sort
QuickSort
MergeSort
HeapSort
What will be the output :
[0,3]
[0,1]
[2,0]
[1,6]
What is the correct syntax for including an external CSS file in an HTML document?
<css href="style.css">
<style src="style.css">
<stylesheet link="style.css">
<link rel="stylesheet" href="style.css">
When you append an element to a dynamic array and the array is already full, what is the time complexity of resizing the array?
O(1)
O(log n)
O(n)
O(n log n)
Which of the following algorithms is best suited for searching in a sorted array?
Binary Search
Jump Search
Linear Search
Fibonacci Search
Value of x = ?, y = ?
7,9
9,7
Error
7,7
Which CSS rule will select all elements with the class "header"?
*header {}
#header {}
.header {}
header {}
What is the time complexity of Dijkstra’s algorithm when implemented using an adjacency matrix and a simple array for the priority queue?
O(n^2)
O(n^3)
O(n log n)
O(m log n)
Which algorithm is most efficient when solving the problem of finding the longest common subsequence (LCS) of two sequences?
Brute Force
Greedy Algorithm
Dynamic Programming (LCS Algorithm)
Divide and Conquer
What will be the Output :
Java1010
Java1111
Java1012
Java1011
Which of the following properties is used to create rounded corners in CSS?
border-corner
border-radius
corner-radius
border-style
You are given a sorted array containing duplicate elements. What modification would you make to binary search to find the first occurrence of an element?
Keep searching the right half after finding the element
Modify the binary search condition to only search for unique values
Keep searching the left half after finding the element
No modification needed, as the first occurrence will always be found
In which of the following problems is a "Divide and Conquer" strategy not suitable?
MergeSort
Longest Common Subsequence (LCS)
Matrix Chain Multiplication
Binary Search
What will be the Output ?
-1
123
321
true
What will be the Output ?
2
8
-2
Error
What will be the Output ?
x: 24
y: 10
z: 14
x: 28
y: 11
z: 15
x: 20
y: 14
z: 14
x: 24
y: 11
z: 14
What will be the Output ?
AVS Engineering College
Error
AVS Engineering College0
0
In the below code snippet, in what order will the margins be added?
p { margin: 25px 50px 75px 100px; }
Top, Right, Bottom, Left
Top, Left, Bottom, Right
Top, Bottom, Right, Left
Right, Left, Top, Bottom
What will be the Output ?
-121
false
121
true
Which of the following is the correct traversal order for a Depth-First Search (DFS) in a graph?
Pre-order
In-order
Post-order
Any of the above depending on implementation
What will be the Output ?
false
-1
true
0
Which of the following problems is best solved using the "Backtracking" algorithm?
Finding the shortest path in a graph
Solving a Sudoku puzzle
Sorting an array
Finding the minimum spanning tree
What will be the output ?
[1, 1, 3, 2, 4, 4, 4]
[1, 1, 3, 2, 4, 4]
[1, 2, 3, 4, 4]
[1, 1, 2, 3, 4, 4]
