For the convenience of JavaRush students, we decided to collect lectures and articles about the most important topics in programming. The second selection is about data structures. In the mini-guide, we briefly outline the essence of the articles, and if you follow the link, you can learn more about the topic of interest. Add the collection to your bookmarks and return to it when needed.
Materials about data structures
Articles and lectures
There are a huge variety of data structures in programming. Very often, when solving a specific problem, the most important thing is choosing the most suitable data structure for this purpose. This lecture talks about data structures such as stack and queue. At the end of the lecture, the author also provides links to useful resources about data structures.
The lecture talks about such a data structure as a pyramid (also known as a heap and a binary heap). As a rule, such data structures are used in various schedulers and other structures in which it is necessary to indicate the priority of various tasks. In addition to the theory, the article provides an implementation of the pyramid in Java.
Among the databases for data structures, it is definitely worth understanding binary search trees. The lecture examines the structure itself with its features and advantages and shows how a binary tree can be implemented in Java.
A map is a data structure that contains a set of key-value pairs. Its data structure resembles a dictionary, which is why it is often called that. At the same time, Map is an interface, and in the standard jdk it contains the main implementations:
Hashmap ,
LinkedHashMap ,
Hashtable ,
TreeMap . The article answers the most popular questions about
Map .
This detailed “encyclopedia” will tell you everything you need to know about arrays from the start: what they are, how to declare and create an array, what the length of an array is, and also how to initialize an array and display it on the screen.
In this lecture, you will learn about the differences between
Map and other data structures and use a live example to see how to create
a HashMap in Java and work with the class.
Lecture for those who are already familiar with the
Map interface and its application options. It talks about the implementation features
of TreeMap , and more specifically, how it differs from
HashMap and how to use it correctly.
When developing, it is often difficult to predict what size arrays will be needed. Therefore, the function of dynamic memory allocation while the program is running is necessary for every programming language.
In Java, there is an ArrayList class for this purpose : this is what we will talk about.
In
a LinkedList, the elements are actually links in a chain. Each element, in addition to the data it stores, has a link to the previous and next element.
Videos
A prefix tree is a data structure that allows you to store an associative array whose keys are strings. In Sergey Arkhipov's video, you will learn how prefix trees are used in Java development, how to save a tree to a file, how to load it back, and much other useful information.
Studying data structure in Java is impossible without the
HashMap ,
TreeMap and
LinkedHashMap classes . In this video, Java and Kotlin developer Ilya Niksan conducted a detailed analysis of the differences between these classes, their properties and use cases.
Data structures in “interview questions and answers”
One of the fundamental topics of any interview is data structures in Java. This article contains a list of questions that you might be asked on this topic at an interview, including about arrays and the hierarchy of collections.
Continuing the previous text about questions that may be asked on the topic of data structures, the author examines the topics
Map ,
List ,
HashMap and others.
Bonus
Book review: “Java Data Structures and Algorithms”, Robert Laforet
The book is devoted to the study and use of data structures and algorithms in programming. It explains how data structures determine the way data is organized in memory, and how algorithms perform various operations on these structures.
Other materials in the series: |
|