Code
- PriorityQueue.cs
- Player.cs
Algorithm
- Heap
- Data structure created for priority queue as a type of complete binary tree
- Data structure that can easily extract maximum and minimum values
- Priority Queue
- Creates a maximum heap (in the form of a full binary tree) with n elements to be aligned
- Ejects elements from the heap one at a time and stores them from the back of the array
- Sort deleted elements (delete from maximum) in the order in which values are reduced
Interface
- IComparable
- Make a condition on type
- CompareTo
- Compare two values and return result
- Compare two values and return result
Struct
- Structure
- a composite data type
- defines a physically grouped list of variables under one name in a block of memory, allowing the different variables to be accessed via a single pointer or by the struct declared name which returns the same address
- contain other data types so is used for mixed-data-type records such as a hard-drive directory entry (file length, name, extension, physical address, etc.), or other mixed-type records (name, address, telephone, balance, etc.).