An algorithm is a step-by-step procedure or set of rules designed to perform a specific task or solve a particular problem.
2. What are the types of algorithm efficiencies?
The types of algorithm efficiencies are time complexity, which measures the time an algorithm takes to complete, and space complexity, which measures the amount of memory an algorithm uses.
3. What is worst-case efficiency?
Worst-case efficiency is the maximum amount of time or space an algorithm requires to complete, given the most difficult input of a particular size.
4. What is order of growth?
Order of growth describes how the time or space complexity of an algorithm increases relative to the size of the input, typically expressed using Big O notation.
5. Define recurrence relation.
A recurrence relation is an equation that defines a sequence of values, where each term is expressed as a function of one or more previous terms. It is often used to describe the time complexity of recursive algorithms.
6. Define convex hull problem.
The convex hull problem involves finding the smallest convex polygon that can enclose a given set of points in a plane, such that all the points are either on the boundary of the polygon or inside it.
7. Define Knapsack problem.
The Knapsack problem is an optimization problem where the goal is to select a subset of items, each with a given weight and value, to maximize the total value without exceeding a specified weight capacity.
8. Define max heap.
A max heap is a complete binary tree where each node's value is greater than or equal to the values of its children. The largest value is at the root node.
.jpg)
