Types of Algorithms

Brute Force Algorithms: A problem solving technique where a series of possible answers are worked out and each possibility is tested for accuracy. This technique is particularly useful on multiple choice problems.

1. Sequential Search

2. Hamilton Circuit

Greedy Algorithms

1. Prim’s Minimal Spanning Tree

2. Kruskal’s Minimal Spanning Tree

3. Dijkstra’s Single-Source Shortest Path

4. Coin Change

5. Egyptian Fractions

6. Map Coloring

7. Voting Districts

8. Vertex Cover

9. 0/1 Knapsack

Divide and Conquer Algorithms

1. Merge Sort

2. Quick Sort

3. Tiling with L-Grouped Tiles

4. Closet Pair

5. Strassen’s Matrix Multiplication

Backtracking Algorithms

1. Solution Spaces

2. Traveling Salesperson

3. The Queens Problem

4. Convex Hull (Graham’s Scan)

5. Generating Permutations

Branch Bound Algorithms

1. Cost Based Tree Traversal

2. Mazes

3. Travelling Salesperson Problem

4. Job Scheduling

5. Integer Linear Programming

Dynamic Programming Algorithms

1. Fibonacci Numbers

2. 0/1 Knapsack Problem

3. All Pairs Shortest Path (Floyd-Warshall)

Testing Code

package acm.edu.salary;

public class changeSalary {

@SuppressWarnings("null")

public String changedSalary(String salary) {

String salary2 = salary.re;

// declare a new matrix to store the cost

int[][] salaryMatrix = null;

// this block initializes the first row and first column in a numerical sequence

for (int i = 0; i < salary.length() ; i++ ) {

salaryMatrix[i][0] = i;

for ( int j = 0; j < salary.length(); j++ ) {

salaryMatrix[0][j] = j;

}

}

// finding the minimum value

for (int i = 1; i < salary.length() ; i++ ) {

for ( int j = 1; j < salary.length(); j++ ) {

}

}

try {

int sourceSalary = Integer.parseInt(salary);

int targetSalary = Integer.parseInt(salary2);

}catch(NumberFormatException nfe) {

}

return salary2;

}

}