Skip to content

Linked List, Binary Search Tree and Knight's Travail

Notifications You must be signed in to change notification settings

michpara/datastructures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Data Structures

Players can choose to be the guesser or the creator of the secret code

Three projects focused on learning and applying data structures.

Linked Lists

A linked list is a linear collection of data elements called nodes that “point” to the next node by means of a pointer.

Each node holds a single element of data and a link or pointer to the next node in the list.

Binary Search Tree

In computer science, a binary search tree (BST), also called an ordered or sorted binary tree, is a rooted binary tree whose internal nodes each store a key greater than all the keys in the node's left subtree and less than those in its right subtree.

Knight's Travail

A knight in chess can move to any square on the standard 8x8 chess board from any other square on the board, given enough turns (don’t believe it? See this animation). Its basic move is two steps forward and one step to the side. It can face any direction.

The function knight_moves shows the simplest possible way to get from one square to another by outputting all squares the knight will stop on along the way.