WGU C949 EXAM PRACTICE QUESTIONS
AND CORRECT ANSWERS!!
What is the order of the Big O-Notation from quickest to slowest?
O(1) - Constant Time
O(log n) - Logarithmic Time
O(n) - Linear Time
O(n log n) - Log-Linear Time
O(n²) - Quadradic Time
O(2^n) - Exponential Time
O(!) - Factorial Time
What is a Class?
Blueprint or template for creating objects. It defines a set of properties (attributes) and behaviors
(methods) that an object created from the class can have.
What is an attribute?
Variables that hold data related to the class. They define the state of an object.
Defined within the __init__ method using self.
What is a method?
Functions defined within a class that operate on its attributes or perform actions.
Python: Defined with def keyword within the class.
What is finiteness in an algorithm?
,An algorithm must always have a finite number of steps before it ends.
What is the Modularity factor of an algorithm?
An algorithm should be able to be broken down into small-small modules or small-small step.
What is the Extensibility factor of an algorithm?
An algorithm should allow the addition of new capabilities or functionality.
What is Definiteness in an algorithm?
An algorithm needs to have exact definitions for each step.
What is a recursive algorithm?
A recursive algorithm calls itself as part of its solution.
What is a base case?
This is the condition under which the recursion stops. It represents the simplest instance of the
problem, which can be solved directly without further recursion.
What is a linear search?
Definition: A simple algorithm that searches for a target value in a list by checking each
element, one by one, from the beginning to the end.
Time Complexity:
Best Case: O(1)
Average Case: O(n)
Worst Case: O(n)
, What is a binary search?
Definition: A search algorithm that finds the position of a target value within a sorted list by
repeatedly dividing the search interval in half. Divide and Conquer
Time Complexity:
Best Case: O(1)
Average Case: O(log n)
Worst Case: O(log n)
What is a bubble sort?
Definition: Iterates through a list comparing adjacent elements and swapping them.
Time Complexity:
Best Case: O(n)
Average Case: O(n²)
Worst Case: O(n²)
What is a selection sort?
Definition: Repeatedly finds the lowest value and swaps it with the current element being
examined.
Time Complexity:
Best Case: O(n²)
Average Case: O(n²)
AND CORRECT ANSWERS!!
What is the order of the Big O-Notation from quickest to slowest?
O(1) - Constant Time
O(log n) - Logarithmic Time
O(n) - Linear Time
O(n log n) - Log-Linear Time
O(n²) - Quadradic Time
O(2^n) - Exponential Time
O(!) - Factorial Time
What is a Class?
Blueprint or template for creating objects. It defines a set of properties (attributes) and behaviors
(methods) that an object created from the class can have.
What is an attribute?
Variables that hold data related to the class. They define the state of an object.
Defined within the __init__ method using self.
What is a method?
Functions defined within a class that operate on its attributes or perform actions.
Python: Defined with def keyword within the class.
What is finiteness in an algorithm?
,An algorithm must always have a finite number of steps before it ends.
What is the Modularity factor of an algorithm?
An algorithm should be able to be broken down into small-small modules or small-small step.
What is the Extensibility factor of an algorithm?
An algorithm should allow the addition of new capabilities or functionality.
What is Definiteness in an algorithm?
An algorithm needs to have exact definitions for each step.
What is a recursive algorithm?
A recursive algorithm calls itself as part of its solution.
What is a base case?
This is the condition under which the recursion stops. It represents the simplest instance of the
problem, which can be solved directly without further recursion.
What is a linear search?
Definition: A simple algorithm that searches for a target value in a list by checking each
element, one by one, from the beginning to the end.
Time Complexity:
Best Case: O(1)
Average Case: O(n)
Worst Case: O(n)
, What is a binary search?
Definition: A search algorithm that finds the position of a target value within a sorted list by
repeatedly dividing the search interval in half. Divide and Conquer
Time Complexity:
Best Case: O(1)
Average Case: O(log n)
Worst Case: O(log n)
What is a bubble sort?
Definition: Iterates through a list comparing adjacent elements and swapping them.
Time Complexity:
Best Case: O(n)
Average Case: O(n²)
Worst Case: O(n²)
What is a selection sort?
Definition: Repeatedly finds the lowest value and swaps it with the current element being
examined.
Time Complexity:
Best Case: O(n²)
Average Case: O(n²)