wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Techstars_Hub Third Quarter Coding Examination

Total questions: 100

Worksheet time: 17mins

Name
Class
Date
1.

What is an array?

a)

A collection of elements stored at random locations

b)

A collection of elements stored at contiguous memory locations

c)

A single Variable

d)

A function

2.

What is the time complexity of accessing an element in an array by index?

a)

0(n)

b)

0(log n)

c)

0(1)

d)

0(n^2)

3.

In a stack, which operations adds an element?

a)

Pop

b)

Push

c)

Peek

d)

Dequeue

4.

What does LIFO stand for in stacks?

a)

Last in first out

b)

Last in final out

c)

Linear in first out

d)

List in firstfirst out

5.

In a queue, which end do you add elements?

a)

Front

b)

Rear

c)

Middle

d)

Any end

6.

What is the root of a binary tree?

a)

The last node

b)

The middle node

c)

The topmost node

d)

The leftmost node

7.

How many children can a node in a binary tree have at most?

a)

1

b)

2

c)

3

d)

Unlimited

8.

What is linear search?

a)

Searching in a sorted array only

b)

Searching each element one by one

c)

Searching using recursion

d)

Searching in trees only

9.

What is the best case case time complexity of linear search?

a)

O(n)

b)

O(log n)

c)

O(1)

d)

O(n2)

10.

In a bubble sort, what happens in each pass?

a)

One element reaches its correct position

b)

All elements are sorted

c)

Nothing happens

d)

Elements are randomly shuffled

11.

What is a linked list?

a)

An array with fixed size

b)

A collection of nodes connected by pointers

c)

A sorting algorithm

d)

A search technique

12.

What does each node in a singly linked list contains?

a)

Only data

b)

Only pointer

c)

Data and pointer to next node

d)

Multiple data values

13.

What is the space complexity of an algorithm that uses a fixed amount of space?

a)

O(n)

b)

O(log n)

c)

O(1)

d)

O(n2)

14.

What is recursion?

a)

A loop

b)

A function calling itself

c)

A data structure

d)

A sorting method

15.

What is the base case in recursion?

a)

The first call

b)

The Condition to stop recursion

c)

A data structure

d)

A sorting method

16.

What is the time complexity of a binary search?

a)

O(n)

b)

O(log n)

c)

O(n2)

d)

O(1)

17.

Binary search works only on......??

a)

Unsorted arrays

b)

Sorted arrays

c)

Linked list

d)

Stacks

18.

What is the worst case time complexity of quicksort?

a)

O(n log n)

b)

O(log n)

c)

O(n2)

d)

0(1)

19.

Which sorting algorithm has the best worst case time complexity?

a)

Bubble sort

b)

Selection sort

c)

Merge sort

d)

Quick sort

20.

What is a hash table?

a)

A sorted array

b)

A data structure using key-value pairs

c)

A tree structure

d)

A stack implementation

21.

What is collision in hashing?

a)

When two keys map to the same index

b)

When the hash table is full

c)

When a key is not found

d)

When hash function fails

22.

In a binary search tree, the left child is

a)

Greater than parent

b)

Less than parent

c)

Equal to parent

d)

Random value

23.

What is the height of a balanced binary tree with n nodes?

a)

O(n)

b)

O(log n)

c)

O(1)

d)

O(n^2)

24.

Which traversal visits root first in a binary tree?

a)

Inorder

b)

Postorder

c)

Preorder

d)

Level order

25.

What is a graph?

a)

A tree with cycles

b)

A collection of vertices and edges

c)

A linear data structure

d)

A sorting algorithm

26.

What is BFS in graphs?

a)

Binary First Search

b)

Breadth First Search

c)

Best First Search

d)

Backward First Search

27.

Which data structure is used in BFS?

a)

Stack

b)

Queue

c)

Array

d)

Tree

28.

What is DFS in graphs?

a)

Data First Search

b)

Depth First Search

c)

Direct First Search

d)

Double First Search

29.

Which data structure is used in DFS?

a)

Stack

b)

Queue

c)

Array

d)

Hash table

30.

What is dynamic programming?

a)

Writing dynamic code

b)

Solving problems by breaking into sub problems

c)

Programming in runtime

d)

Object oriented programming

31.

What is memorization?

a)

Memory allocation

b)

Storing results of expensive function calls

c)

Creating memory leaks

d)

Memory deallocation

32.

What is the principle behind greedy algorithms?

a)

Always choose the globally optimal solutions

b)

Always choose the locally optimal solution

c)

Choose random solutions

d)

Try all possible solutions

33.

What is a heap?

a)

A complete binary tree with heap property

b)

A sorting algorithm

c)

A searching technique

d)

A hash table

34.

In a max heap, the parent node is:

a)

Smaller than children

b)

Greater than or equal to children

c)

Equal to children

d)

Random compared to children

35.

What is the time complexity of insertion in a binary heap?

a)

O(n)

b)

O(log n)

c)

O(1)

d)

O(n2)

36.

What is the space complexity of merge sort?

a)

O(1)

b)

O(log n)

c)

O(n)

d)

O(n2)

37.

Which algorithm is used to find shortest path in weighted graphs?

a)

BFS

b)

DFS

c)

Dijkstra's algorithm

d)

Linear Search

38.

What is the time complexity of Dijkstra's algorithm using binary heap?

a)

O(V2)

b)

O((V+E)log V)

c)

O(VE)

d)

O(V log V)

39.

What is a Trie data structure used for?

a)

Sorting numbers

b)

String matching and prefix searches

c)

Graph traversal

d)

Mathematical Calculations

40.

What is the worst-case time complexity of searching in a hash table?

a)

O(1)

b)

O(log n)

c)

O(n)

d)

O(n2)

41.

Which of the following is NOT a stable sorting algorithm?

a)

Merge Sort

b)

Insertion Sort

c)

Quick sort

d)

Bubble sort

42.

What is the minimum number of comparisons needed to sort n elements?

a)

O(n)

b)

O(n log n)

c)

O(n2)

d)

O(log n)

43.

In Red-Black trees, what is the maximum height?

a)

O(n)

b)

O(2 log n)

c)

O(log n)

d)

O(n2)

44.

What is Floyd - Marshall algorithm used for?

a)

Sorting

b)

All pairs shortest paths

c)

Minimum spanning tree

d)

Maximum flow

45.

What is the time complexity of Floyd-Warshall algorithm?

a)

O(V2)

b)

O(V3)

c)

O(V+E)

d)

O(VE)

46.

What data structure is used to implement LRU cache efficiently?

a)

Array

b)

Hash table + Doubly linked

c)

Stack

d)

Queue

47.

What is the amortized time complexity of dynamic array resize?

a)

O(1)

b)

O(log n)

c)

O(n)

d)

O(n2)

48.

What is the segment tree used for?

a)

Sorting

b)

Graph traversal

c)

String matching

d)

Range queries and updates

49.

What is the space complexity of iterative deepening search?

a)

O(b^m)

b)

O(bd)

c)

O(b2d)

d)

O(d^2)

50.

What is the principle of Divide and conquer?

a)

Solve problem iteratively

b)

Use greedy search approach

c)

Break problem into smaller sub problems, solve recursively combine solutions

d)

Store all possible solutions

51.

What does SaaS stand for?

a)

System as a service

b)

Storage as a service

c)

Security as a service

d)

Software as a service

52.

Which is an example of IaaS ?

a)

Amazon EC2

b)

Gmail

c)

Microsoft Office 365

d)

Dropbox

53.

What is the main benefit of Cloud Computing?

a)

Higher costs

b)

Limited access

c)

Scalability and cost efficiency

d)

More hardware needed

54.

What does PaaS stand for?

a)

Only hardware

b)

Platform for developing applications

c)

Only software

d)

Only networking

55.

Which cloud deployment model is most secure for sensitive data?

a)

Public cloud

b)

Hybrid cloud

c)

Community cloud

d)

Private cloud

56.

What is serverless computing?

a)

Computing where server management is abstracted

b)

Computer without servers

c)

Using only physical servers

d)

Free computing services

57.

What is auto-scaling in cloud?

a)

Manual server management

b)

Automatic adjustment of resources based on demand

c)

Fixed resource allocation

d)

Turning off servers automatically

58.

What is a virtual machine?

a)

A physical computer

b)

A programming language

c)

A database system

d)

Software emulation of a physical computer

59.

What is Containerization?

a)

Packaging applications with their dependencies

b)

Storing data in containers

c)

Physical shipping

d)

Database management

60.

What is the main advantage of microservice architecture?

a)

Single point of failure

b)

Independent deployment and scaling

c)

More complex management

d)

Higher costs

61.

What is machine learning?

a)

Programming computers manually

b)

Algorithms that improve through experience

c)

Building physical machines

d)

Learning to use machines

62.

What type of learning uses labelled data?

a)

Supervised learning

b)

Unsupervised learning

c)

Reinforcement learning

d)

Semi supervised learning

63.

What is overfitting in ML?

a)

Model performs well on training but poorly on test data

b)

Model performs poorly on all data

c)

Model is too simple

d)

Model has no errors

64.

What is neural network inspired by?

a)

Computer circuits

b)

Human Brain

c)

Internet structure

d)

Mathematical equation

65.

What is the purpose of training data?

a)

To test the final model

b)

To reach the algorithm

c)

To deploy the model

d)

To visualize results

66.

What is classification in ML?

a)

Predicting Continuous values

b)

Predicting discrete categories

c)

Clustering data points

d)

Reducing data dimensions

67.

What is regression in ML?

a)

Predicting categories

b)

Predicting continuous values

c)

Clustering data

d)

Data cleaning

68.

What is Cross validation used for?

a)

Training the model

b)

Collecting data

c)

Visualizing results

d)

Evaluating model performance

69.

What is feature engineering?

a)

Building ML models

b)

Selecting and transforming input variables

c)

Testing models

d)

Deploying models

70.

What is Deep Learning?

a)

Learning deeply about topics

b)

ML using neural networks with many layers

c)

Underground learning

d)

Slow learning process

71.

What is a lambda function?

a)

a named function

b)

A class method

c)

A module function

d)

An anonymous function

72.

What is event bubbling?

a)

Creating events

b)

Removing events

c)

Events propagating from child to parent

d)

Event validation

73.

What does async/await do?

a)

Makes code run faster

b)

Handles asynchronous operations

c)

Creates loops

d)

Validates data

74.

What is the difference between === and ==?

a)

No difference

b)

== is faster

c)

=== is deprecated

d)

=== checks type and value, == only value

75.

What is a closure in JavaScript?

a)

A closed function

b)

An anonymous function

c)

A function with access to outer functions variable

d)

A callback function

76.

What is phishing?

a)

Fishing for data in databases?

b)

Network monitoring

c)

Data backup

d)

Fraudulent attempts to obtain sensitive information

77.

What does SSL/TLS Provide?

a)

Faster internet

b)

Encrypted communication

c)

More storage

d)

Better graphics

78.

What is two-factor authentication?

a)

Using two passwords

b)

Two security guards

c)

Additional security layer beyond password

d)

Dual monitors

79.

What is malware?

a)

Hardware problems

b)

Malicious software

c)

Network errors

d)

System updates

80.

What is social engineering in cyber security?

a)

Building social networks

b)

Manipulating people to divulge information

c)

Engineering social media

d)

Team Building

81.

CPU means

(a)  

82.

RAM means

(a)  

83.

What is the difference between hardware and software?

a)

No difference

b)

Software is faster

c)

Hardware is newer

d)

Hardware is physical, software is programs

84.

What is an operating system?

a)

A hardware component

b)

Software that manages computer hardware and software

c)

A programming language

d)

A database system

85.

What is the purpose of a hard drive?

a)

Processing data

b)

Storing data permanently

c)

Displaying information

d)

Network communication

86.

What will be the output of the "print(result)" statement?

a)

[1, 3, 5, 7, 9]

b)

[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

c)

[2, 4, 6, 8, 10]

d)

[]

87.

What would be the output of the two print statements?

a)

True and True

b)

True and False

c)

False and True

d)

False and False

88.

What will be the output of the "print(squared_numbers) statement?

a)

[2, 3, 4, 5]

b)

[4, 9, 16, 25]

c)

[2, 9, 4, 25]

d)

[1, 2, 3, 4, 5]

89.

What will be the final output of the two print statements:

a)

Execution completed. 5.0. And Error: Cannot divide by zero. Execution completed. None

b)

5.0 Execution completed And. None Execution completed

c)

Execution completed. 5.0 And. Error: cannot divide by zero none Execution completed

d)

5.0 and None

90.

What will be the output of the "print(fruit_counts)" statement?

a)

{'apple': 3, 'orange': 2. 'banana': 1.}

b)

{'apple': 1, 'orange': 1, 'banana': 1}

c)

{'apple', 'apple', 'apple', 'orange', 'orange', 'banana']

d)

{'apple': '3', 'orange': '2', ' banana': '1'}

91.

What will be the output of the "print(factorial(4))" statement?

a)

16

b)

24

c)

12

d)

4

92.

What will be the final output of the three print statements?

a)

True False True

b)

True False False

c)

False False False

d)

True True False

93.

What will be the output of " print(unique_elements) statement?

a)

[1, 2, 3, 4, 5, 6]

b)

[1, 2, 2, 3, 4, 4, 4, 5,6, 6]

c)

[1, 5, 2, 6, 3,4]

d)

[1, 2, 3, 4, 5, 6, 7, 8]

94.

If the get_user_data function is called "octocat", and the API call is successful z which of the following is most likely to be part of the output?

a)

Name: octocat\nPublic Repos: 8

b)

The Octocat\nPublic Repos: 8

c)

Error fetching user data: .....

d)

Undefined

95.

If the "data.csv" file contains the content as described in the code comments, what will be the output?

a)

Name, Age, City

b)

Alice, 30, New york

c)

Name, Age, City\nAlice, 30, New york\nBob, 25, London \nCharlie, 35, Paris

d)

Name, Age, City, Alice, 30, New York, Bob, 25, London Charlie, 35, Paris

96.

What is the primary function of a "for loop" in programming

a)

To execute a block of code only if a certain condition is true

b)

To repeatedly execute a block of code a specific number of times

c)

To define a reusable block of code that performs a specific task

d)

To handle errors and unexpected events during program execution

97.

Which of the following data types is used to store a collection of unique, unordered items?

a)

List

b)

Tuple

c)

Dictionary

d)

Set

98.

In object oriented programming, what is the concept of "inheritance"?

a)

The process of creating a new object from an existing class

b)

The ability of a class to acquire the properties and behaviors of another

c)

The bundling of data and methods that operate on that data into a single unit

d)

The ability of an object to take on many forms

99.

What is the purpose of a while loop?

a)

To execute a block of code q predetermined number of times.

b)

To break a program into smaller, manageable units

c)

To execute a block of code as long as specified condition is true

d)

To define a set of instructions that can be called by name

100.

What is a 'syntax error' in programming?

a)

An error that occurs due to incorrect logic, causing the program to produce unexpected results.

b)

An error that occurs when the program tries to access a resource that does not exist

c)

An error that violates the rules of the programming language's grammar

d)

An error that causes the program to crash or stop executing unexpectedly