List is one of the most commonly used collection data types. It is an implementation of the collection to work with a group of ordered data.
The data in a list may be ordered based on when it was added (for example if we add 3 after 4 to an Int list, then 4 will appear in the list before 3, much like an array) or we may even ordered them with ordering/sorting algorithms.
The following is a list of the most important functions defined in the List interface:
- fun get(index: Int):E: This method is used to get an element from the list at the given index.
- fun indexOf(element: @UnsafeVariance E):Int: This method is useful to identify the index of an element in the list. This method should search for the specified element inside the whole list and should return the position of the element if it's in the list...