For the convenience of CodeGym students, we decided to collect lectures and articles on 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 a collection to your bookmarks and return to it when you need to.
Materials about data structures
Articles and lectures
In programming, there are a huge variety of data structures. Very often, when solving a specific problem, the most important thing is choosing the most appropriate data structure for this. This lecture deals with 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 deals with 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 theory, the article provides an implementation of the pyramid in Java.
Among the bases for data structures, you should definitely deal with binary search trees. The lecture looks at the structure itself, with its features and benefits, and shows how a binary tree can be implemented in Java.
Map is a data structure that contains a set of key-value pairs. In its data structure, it resembles a dictionary, which is why it is often called that. At the same time, Map is an interface, and in the standard jdk 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 it is, how to declare, create an array, what is the length of an array, as well as how to initialize an array and display it on the screen.
In this lecture, you will learn about the difference between
Map and other data structures and take a live example of how to create
a HashMap in Java and work with the class.
A lecture for those who are already familiar with the
Map interface and its uses. It talks about the features of the implementation
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 during program operation is necessary for every PL.
In Java, there is an ArrayList class for this purpose : we will talk about it.
In
a LinkedList, the elements are actually links in the same 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 a lot of other useful information.
Learning the data structure in Java is unthinkable without the
HashMap ,
TreeMap , and
LinkedHashMap classes . In this video, Java and Kotlin developer Ilya Niksan provides 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 has compiled a list of questions that you might be asked about this topic in an interview, including arrays, collection hierarchies.
In continuation of the previous text about questions that may be asked on the topic of data structures, the author analyzes the topics of
Map ,
List ,
HashMap and others.
Bonus
Book Review: Java Data Structures and Algorithms by Robert Laforet
The book is devoted to the study and use of data structures and algorithms in programming. It explains how data structures define the way data is organized in memory, and how algorithms perform various operations on these structures.
GO TO FULL VERSION