Font size
WorksheetsDSA quiz
Total questions: 36
Worksheet time: 36mins
______________ is the process of identifying a problem, developing possible solution paths, and taking the appropriate course of action
Problem solving
Algorithm
Flow Chart
Pseudo code
WHY IS PROBLEM SOLVING IMPORTANT?
To help in decision making.
To develop practical and creative solutions.
Empowers you in your personal life and professional life
All the Above
Which of the following is not in PROBLEM SOLVING CYCLE
EXPLORE
ALTERNATIVES
SOLVE
IMPLEMENT
___________ Solutions dealt with computers
Algorithmic
Heuristic
Popular ways of representing logic
Algorithms
Flow charts
Pseudocode
All the above
Characteristics of Algorithm
Well Defined inputs / Outputs
Ambiguous
Finiteness
Terminate Ultimately
Criteria for Deciding Successful Algorithms
Accuracy
Consistency
Efficiency
All the above
Which of the following keyword not in Input Stage
accept
read
get
in
Which of the following keyword in Initialize Stage
accept
read
get
Set
An algorithm is a
set of instructions that create something different every time
a set of instructions that work the same everytime
A set of instructions that only work for those who followed the steps before
a set of instructions for computer programming only
What you have to work with is called
outputs
steps
materials
inputs
An algorithm is a ---------- of solving math problems faster than counting one-by-one
Sequential way
Step by Step way
Integrated way
None of the above
Select correct options for an algorithm.
It has infinite number of Steps
The action specified by the step cannot be interpreted in multiple ways
The range of input may not be specified.
Several algorithms for solving the same problem may exist.
The instructions can be performed by using the given inputs in a finite amount of time
Rearrange the following steps of algorithm.
a) Fry and cook the vegetable for 2 - 4 minutes
b) Add water in the bowl
c) Take a bowl filled with water
d) Cut the required vegetables
e) Add noodles and vegetables to the boiling water
f) Enjoy your dinner
g) Remove from flame and serve it
h) Boil the water for 2 - 4 minutes
a, c, d, e, b, f, g, h
c, d, a, b, h, e, g, f
c, a, e, g, h, b, d, f
c, h, a, g, c, e, d, f
The purpose of using parallelogram in flowchart is
To denote data storage
To denote decision making
To denote the process that cannot be solved
To show input / output
The following statements are examples of
i = 1
sum = sum + i
a = a-b
Assignment statements
Declaration statements
Input statements
Output statements
To allow operations to be repeated for fixed number of time or until some condition is met. This is _______ structure
Selection
Loop
Sequential
Simple
_______ representation of logic to solve a problem in natural English language
Pseudocode
Flowchart
High level program
Assembly language program
A flowchart using symbols displays the ____ to be performed and the ____ in which they occur
Sequence, program
Decision, flow
Operations, sequence
Program, operations
Statement 1: Flowcharts provide better communication because even the non-programmers can understand the logic of program
Statement 2: Flowcharts can be modified frequently as per the requirement if there is any change
Only Statement 1 is true
Only Statement 2 is true
Both Statements are true
Both Statements are False
Statement 1: Flowcharts act as good documentation and can be used for various purposes
Statement 2: Flowchart acts as a reference during system analysis and program development
Only Statement 1 is true
Only Statement 2 is true
Both Statements are true
Both Statements are False
While writing an algorithm, instructions are written from
Left to Right
Right to Left
Top to bottom
Depends on the one who is writing algorithm
An algorithm is
Collection of symbols used to design a flowchart
Sequence of unambiguous instructions for solving a problem
Sequence of instructions to be followed before choosing any language
Written in natural language
Find the missing statement:
Step 1: Read a and b
Step 2: a = a+ b
Step 3:
Step 4: a = a-b
Step 5: print a, b
b=a+b
b=a-b
b=a*b
b=a/b
What is the output of the flowchart if v = 5
120
24
0
12
__________ is a program that converts high level language program into machine language
Compiler
Assembler
Interpreter
Pascal
What is the output of the flowchart if y=4
6
10
8
12
______ uses only 1 s and 0 s
Machine language
Assembly language
High level language
system software
Which is not an algorithmic Strategies?
oBrute force
oDivide and conquer
oDynamic programming
oGreedy approach
oStatic programming
The amount of time taken by algorithm to run is___________
oTime complexity –
ostatic complexity –
oSpace complexity –
None
What order of complexity does this graph represent?
Exponential
Polynomial
Linear
Logarithmic
How do you reduce the time complexity of an algorithm?
You reduce the amount of embedded for loops, and then reduce the amount of items you complete the operations.
Try to complete all of the operations on the same data set
