Algorithm


In this section, we will implement simple algorithm that are useful for software engineer.

Note: These implementations are naive and simple, haven't been thoroughly tested, please do not use in production, it is meant for simple explanation only.

Simple Binary search algorithm on sorted array. It is an O(log(n)) algorithm. Can be useful at some situation.

Simple DFS and BFS algorithm which iterates through binary tree.

Dynamic programming intends to solve subproblems of the problem first before returning the solution.

Divide and Conquer intends to divide problem into smallest subproblems and then slowly conquer it