Bitboard is a widely-used technique in many computer chess programs for efficiently representing and extracting information on the chessboard. It seems to be simultaneously invented by the computer…
There are two ways to represent a graph data structure, each come with its own pros and cons. An adjacency matrix is a square matrix, each element in the matrix indicate whether pairs of vertices are…
Algorithm to delete a node from a BST: Find the node to delete Find the deepest right most (DRM) node of the tree Replace the node to delete with the DRM Continue find and delete the DRM in the tree…
This one is a bit more compex than the pre-order (in term of using stack). Algorithm: Create an empty stack Create a temporary reference called curr, set it as root Repeat while curr still not null…