DEV Community

b profile picture

Education

Singapore

Work

Student

Finds the shortest path on a 2D grid (with obstacles) using the A* search algorithm.

Finds the shortest path on a 2D grid (with obstacles) using the A* search algorithm.

Comments
2 min read
Determines the fewest coins needed to make up a given amount using a greedy algorithm.

Determines the fewest coins needed to make up a given amount using a greedy algorithm.

Comments
2 min read
Colors a graph so that no two adjacent vertices share the same color using a backtracking approach.

Colors a graph so that no two adjacent vertices share the same color using a backtracking approach.

Comments
2 min read
Finds the contiguous subarray within a one-dimensional array of numbers that has the largest sum.

Finds the contiguous subarray within a one-dimensional array of numbers that has the largest sum.

Comments
2 min read
Applies the simulated annealing algorithm to search for an optimal solution in a large search space.

Applies the simulated annealing algorithm to search for an optimal solution in a large search space.

Comments
2 min read
Approximates a minimum Steiner tree by greedily connecting terminals with the shortest edges.

Approximates a minimum Steiner tree by greedily connecting terminals with the shortest edges.

Comments
1 min read
Attempts to find a subset of numbers that sums exactly to a target value using a greedy strategy.

Attempts to find a subset of numbers that sums exactly to a target value using a greedy strategy.

Comments
2 min read
Recursively finds a TSP path by always visiting the nearest unvisited city, and finally returning to the start.

Recursively finds a TSP path by always visiting the nearest unvisited city, and finally returning to the start.

Comments
2 min read
Schedule jobs on a fixed number of machines to minimize total completion time.

Schedule jobs on a fixed number of machines to minimize total completion time.

Comments
2 min read
Given a matrix and route, function improves route using 2-opt heuristic: reverses segments, reduce total travel distance.

Given a matrix and route, function improves route using 2-opt heuristic: reverses segments, reduce total travel distance.

Comments
2 min read
Places N queens on an NxN chessboard so that no two queens threaten each other.

Places N queens on an NxN chessboard so that no two queens threaten each other.

Comments
2 min read
Solves a standard 9x9 Sudoku puzzle ensuring that each row, column, and 3x3 subgrid contains numbers 1-9.

Solves a standard 9x9 Sudoku puzzle ensuring that each row, column, and 3x3 subgrid contains numbers 1-9.

Comments
2 min read
loading...