Revisiting Java: Consolidating Data Structures and Algorithms Fundamentals
2020 was the pivotal year I fully transitioned from iOS development to backend development. To take on that challenge, in February I used the gaps in my remote-work schedule to systematically review and study the core of Java — data structures and algorithms. This was not just for interviews; it was about laying the most solid possible foundation for my future path as a backend architect.
Reviewing the Old to Learn the New
Although I studied data structures in college, the hands-on practice since then has given me a completely new and much deeper understanding of these fundamentals. This time I didn’t stop at the conceptual level — I focused on their concrete implementation in Java, their performance characteristics, and their real-world use cases.
My learning path covered the following core topics:
-
Fundamental data structures:
- Linear lists: I dug into the underlying implementations of
ArrayListandLinkedList, and understood how their performance differs for insert, delete, update, and lookup operations across different scenarios. - Sorting algorithms: I implemented basic sorting algorithms such as bubble sort, selection sort, and insertion sort by hand, and analyzed their time and space complexity.
- Stacks and queues: I came to understand these two important data structures and how they are used in programs, such as the method call stack and task queues.
- Linear lists: I dug into the underlying implementations of
-
Advanced data structures:
- Hash tables: I focused on the implementation principles of
HashMapandHashtable, including collision resolution strategies (such as chaining and open addressing) and the red-black tree optimization introduced inJava 8. - Trees: I studied binary trees and binary search trees, and took a first look at the red-black tree, a complex but highly efficient self-balancing binary search tree.
- Graphs: I learned the basic concepts and storage structures of graphs (adjacency matrix, adjacency list), preparing myself for more complex algorithms later on (such as shortest path and minimum spanning tree).
- Hash tables: I focused on the implementation principles of
From Theory to Practice
This learning was far from armchair theory. In the backend projects that followed, this knowledge helped me tremendously. For example, when designing a caching solution, my understanding of how HashMap works under the hood let me estimate its performance and potential pitfalls more accurately. When handling data that needed sorting or prioritization, I could pick the most suitable sorting algorithm or data structure for the business scenario (such as using a PriorityQueue for a priority queue).
For a developer determined to go deep in backend engineering, data structures and algorithms are your internal strength — core fundamentals you simply cannot skip. This systematic study provided the hardest-core momentum for my 2020 technology transition.