Problem Solving Flashcards

1
Q

What is Problem Solving?

A

Problem solving is the process of finding a solution for a problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the steps in problem solving?

A

Define the problem
Propose and evaluate solution
Determine the most efficient solution
Test and validate the solution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an Algorithm?

A

An algorithm is a set of detailed, unambiguous and ordered instructions developed to describe the processes necessary to produce the desired output from a given input

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the Divide and Conquer Approach?

A

Divide the given problem into subproblems
Conquer the subproblem by solving them recursively
Combine the solutions for the subproblems to a solution for the original problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

An algorithm must have?

A

Finite number of steps
Precise
Unambiguous
Flow of control
Terminate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Algorithms are usually represented using?

A

Narrative
Pseudocode
Flow chart

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a Constant?

A

A constant is an identifier’s value that cannot be change during the execution of a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are some Data Types?

A

Integers - stores whole numbers
Floating Point/Real - store real or fractional numbers

Characters- a single letter or punctuation

String - a word, phrase or sentence enclosed by double quotes

Boolean - Can only contain one of two values i.e true or false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Rules of Variables?

A

The name of the variable should reveal what it does

It should only contain letters numbers and underscores
It should begin with a letter
It must have no spaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly