Like all good stories in the past few weeks mine starts with OpenAI's Chat GPT.
I have just started my journey in learning Data Structures so naturally I ask chat GPT the best strategy for learning and one of the methods was to implement the given data structure from scratch. Now that sounds daunting...
However, this is a great idea! I am definitely going to add it into my learning strategy. So heres what I have so far.
First I have to pick a data structures to study then I will follow these steps until I feel confident in my ability to understand and use the data structure:
1. Research Research Research.
I will spend some time first gathering information on the data structure.
My research will be focused on the following:
- basics of how to read and write from the structure
- how it came about
- which problems it solves
2. Next I will try to implement it on my own in Java.
Yes, I said Java, a language I do not even know yet. Why would I do this? There is a couple reasons:
- The main reason is that in order to find all of the syntax necessary to create this structure I will need to fully understand how it works.
- I want to learn Java, I remember asking ChatGPT a while ago the best way to learn Java and one of the answers it gave me was to implement data structures in the language.
This step is only possible if I have a deep understanding of the data structure. I will develop this by first learning all of the necessary lower level concepts that go into building the structure like how it is stored in memory and what other data structures are used to build it. These are the steps:
- Learn the low level concepts
- Write the data structure in pseudocode
- convert the pseudocode into Java (and possibly Javascript just for fun)
This is going to be the hardest step and will likely take a couple of days but I believe it's necessary for the learning process.
3. Finally I will solve Leetcode easy questions with my own implementation of the data structure.
I believe this step is crucial because it will help me learn how to actually use the data structure to solve a problem. This will connect all of the dots and align all of the stars for me to understand the data structure.
In case you haven't noticed all of the pictures in this post have been generated by AI.
Once I have done all of these steps I believe I can start tackling harder Leetcode questions using the data structure (and maybe even my implementation of it ¯_(ツ)_/¯).
Top comments (0)