Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 703 Bytes

README.md

File metadata and controls

21 lines (13 loc) · 703 Bytes

sneak-peek-at-cs

My implementation of Linked Lists, Binary Search Trees, Graphs, Adjacency Lists, BFS, DFS.

Linked List Methods

#append(value), #prepend(value), #size, #head, #tail, #at(index), #pop, #contains?(value), #find(value), #to_s, #insert_at(value, index), #remove_at(index).

Binary Search Tree Methods

#build_tree, #insert, #delete, #find, #level_order, #inorder, #preorder, #postorder, #height, #depth, #balanced?, #rebalance.

Knight Travails

This outputs the shortest path that a knight has to take to go from position A to position B on a chess board.

It uses a graph, represented by an adjacency list, and breadth-first-search algorithm to achieve that.