Notice: The following is a sample of a proposed new series of tutorials covering data structures and sorting in programming. Should I receive enough positive feedback, I will proceed with it.
In my Basic Programming Concepts tutorial, I covered how arrays work. The main purpose is that they held a group of variables that are of the same type. There is one issue with arrays though as in order to use them either the number of variables must be established or all of the variables have to be given at the time of declaration. In addition, arrays are often not very flexible with regard to the type of information that can be held. With that in mind, there are many tasks where using a different data structure comes in handy.
One of the data structures that I used the most are usually based on an abstract data type called a List. The reason for it being called abstract is that they have a similar behavior and are defined indirectly. The basic idea for a list is that each variable held in the list is considered to be a node and a list holds a group of these nodes. Furthermore, each node in this list has a link to the next piece of data. So the first node in a list would link to the second node, and so on. The type of List used will determine the capabilities that your List will have, but usually there are two major List types that are used.
(Placeholder for ArrayList information)
(Placeholder for ArrayList examples)
(Placeholder for LinkedList information)
(Placeholder for LinkedList examples)
Notes: Should I continue this series of tutorials, here are sections that would be made in addition to this one:
- The Set Data Structure
- The Map Data Structure
- Introduction to Sorting algorithms (Selection, Insertion, and Bubble Sorts will be covered in this section)
- More sorting algorithms (Merge and Quick Sorts will be covered in this section)
- Introduction to searching algorithms (Linear and Binary Search algorithms will be covered in this section)