0% found this document useful (0 votes)
10 views

chapter 6 computer

Uploaded by

SHEETAL GOLA
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

chapter 6 computer

Uploaded by

SHEETAL GOLA
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

 What is an algorithm?

A flowchart.
Step-by-step instructions that are used to solve a problem.
A flowchart or pseudocode.
A decision.

 Sample Question
What are a compact and informal high-level explanation of a computer programming
algorithm that needs the structural conventions of a programming language? It is a plan
for human reading rather than machine reading.
Pseudocode
Algorithm
Flowchart
Website

 Sample Question
How can you measure the efficiency of an the algorithm?
Processor and memory
Complexity and capacity
Time and space
Data and space

 Sample Question
What is the time complexity of the insert(index) method in ArrayList?
O(n)
O(n^2)
O(nlogn)
O(logn)

 Sample Question
In linked lists there are no NULL links in
Single linked list
Linear doubly linked list
Circular linked list
None of these

 Sample Question
Pictorial representation of data using symbols is known as_____
Bar Graph
Pictograph
Histogram
Histograph

 Sample Question
Share a common key for encryption and decryption.
Symmetrical
Asymmetrical


Faster and uses less processing resources.
 Symmetrical
 Asymmetrical


Key management can be a issue as the number of users
increases.
 Symmetrical
 Asymmetrical

Uses RSA (Rivest-Shamir-Adleman).


 Symmetrical
 Asymmetrical

Used by applications like IKE, SSH, PGP and SSL.


 Asymmetrical

 Sample Question
These are algorithm paradigms except one:
Divide and Conquer
Backtracking
Searching
Greedy

 Sample Question
What is backtracking algorithm?
For computing
For finding improvement on computation problems
For practical jobs
A and B

 Sample Question
Which of the following would instruct a robot to draw a square of side 3 units?
 Forward 3, right turn 90, forward 3, right turn 90, forward 3, right turn 90,forward 3,
right turn 90,
 Move 3 turn 90 move 5 turn 90 move 5 turn 90 move 3 turn 90 move 3
 Forward 3, forward 3, right turn right turn 90,forward 3, right turn forward 3
 Forward 3, turn right forward 3, turn left, forward 3, turn right ,forward 3

Sample Question
The min-heap property states that for every node i other than the root, A[PAERENT(i)] ≤
A[i].
True
False

 Sample Question
Dijkstra's algorithm - is a solution to the _________________ shortest path problem in
graph theory.
Multiple Source
Double Source
None of the above

 Sample Question
Write the equation 53 = 125 in log form.
Log 3 (125) = 5
Log 125 (5) = 3
Log 5 (125) = 3
Log 5 (3) = 124

 Sample Question
A process is a ………….. actually being carried out to solve a problem.
Sequence of activities
Step-by step procedure
Flow of information
Both b and c

 Sample Question
Suppose you have a directed graph representing all the flights that an airline flies. What
algorithm might be used to find the best sequence of connections from one city to
another?
A shortest-path algorithm.
A minimum spanning tree algorithm.
Breadth first search.
Depth first search.

 Sample Question
What are the correct intermediate steps of the following data set when it is being sorted
with the Quick sort? 15,20,10,18
15,10,20,18 -- 15,10,18,20 -- 10,15,18,20
15,20,10,18 -- 15,10,20,18 -- 10,15,20,18
10, 20,15,18 -- 10,15,20,18 -- 10,15,18,20
10, 20,15,18 -- 10,18,15,20 -- 10,15,18,20

 Sample Question
What are the correct intermediate steps of the following data set when it is being sorted
with the Selection sort? 15,20,10,18
10, 20,15,18 -- 10,15,20,18 -- 10,15,18,20
15,20,10,18 -- 15,10,20,18 -- 10,15,20,18 -- 10,15,18,20
15,18,10,20 -- 10,18,15,20 -- 10,15,18,20 -- 10,15,18,20
15,10,20,18 -- 15,10,18,20 -- 10,15,18,20

 Sample Question
Searching and sorting algorithms are best implemented with which data structure?
An array based list
A linked list
Both of the above
None of the above

The "running time" of an algorithm refers to


How much time it takes for the program to run
The number of steps it takes to complete with respect to the size of the input
How much time it takes to write the program

A flowchart needs to represent a situation where for each mark a student is awarded 'Pass' or
'Fail'...the system will consider the mark, and if it's 50 or over, award 'Pass,' else it awards 'Fail.'

This is an example of which of the algorithm constructs?


Decision
Loop
Sequence

A flowchart needs to represent a situation where the user is asked to


enter his age, the age is read into the system, and the system outputs
a 'Thank You' message. This is an example of which of the algorithm
constructs?
Decision
Loop
Sequence
All of the above

What are the three algorithm constructs?


Sequence, selection, repetition
Input, output, process.
Input/output, decision, terminator.
Loop, input/output, process.
In a flowchart, which symbol is used to represent a decision point,
where the flow can branch based on a condition?
Oval
Rectangle
Diamond
Parallelogram
In a flowchart, an input or output instruction is represented by

A rectangle
A parallelogram
A rhombus
A circle

This is an example of which of the algorithm constructs?


Decision
Loop
Sequence
All of the above

In a flowchart, a calculation (process) is represented by


A rectangle
A parallelogram
A rhombus
A circle
Why is a flowchart required?
To plan a program before making it.
To execute a program.
It is easy to use.
To analyze the program.

Are algorithms only used in computers?


True
False

You might also like