There are many types of data structures, each with a different purpose or function. For example, arrays index data with numerical values, while hash tables connect various pieces of data to a corresponding “key.” Data structures also differ in how they arrange the data. Stacks store data in such a way that the last item appears first, and queues store elements sequentially. There are also data structures that define the relationships between the pieces of data. Linked-first structures store data in a series of nodes where each node points to the next node in a chain. Graphs place data in a network showing the relationships of each node to the others. Trees store data in a hierarchical format. Tries, which are similar to trees, are used for efficient problem-solving.