Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,207,657 members, 7,999,877 topics. Date: Monday, 11 November 2024 at 03:17 PM

Data Structures And Algorithms: A Beginner's Journey. - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Data Structures And Algorithms: A Beginner's Journey. (2251 Views)

What Programming Language Is Best To Learn Data Structures And Algorithms? / Anyone Has Done Something On Data Structures And Algorithms On Crossover? / Data Structures And Algorithms (2) (3) (4)

(1) (2) (Reply) (Go Down)

Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 9:39pm On Jun 01, 2020
I stated learning Java from last year and I have held up my progress for so long because I've just been plain lazy. So, during the lockdown in my state,I had to push myself to finish the Java video tutorials I had previously downloaded. So after learning the syntax of the language, I have resolved to move to the next phase of the programming journey-Data Structures and Algorithms.

The reason for this thread is to track my journey for the next two months so I can build the habit of learning everyday and to show what I've learned at the end of each day.
P.S If you're a budding programmer like myself, do well to follow and contribute to the thread. For experienced programmers, your input will be well received.



Day 0.
The Beginning.
Tonight, I'm staying up on till midnight so I can download resources for the learning process(midnight plan). Actually, I have a few books on this topic but I saw a book recommendation today so that's the book I'm choosing; " A Common-Sense Guide To Data Structures and Algorithms" by Jay Wengrow and I'll download a video I saw on YouTube from freeCodeCamp. So, that's about it for now. I'm an absolute beginner so, if you're a beginner like me, let's learn together.

2 Likes

Re: Data Structures And Algorithms: A Beginner's Journey. by tensazangetsu20(m): 9:41pm On Jun 01, 2020
As you are reading that book, solve hackerrank daily. Start with the easy questions and slowly trump the difficulty up. You will be so amazed at how good you become in two months.

4 Likes

Re: Data Structures And Algorithms: A Beginner's Journey. by Nobody: 9:44pm On Jun 01, 2020
Following diligently.

I wish to stay up and download videos too but my sleepy head is sleepy already. grin I have already started with the syntax of Javascript though. The FreeCodeCamp guy who takes Javascript is just too quick for my liking.

2 Likes

Re: Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 9:52pm On Jun 01, 2020
tensazangetsu20:
As you are reading that book, solve hackerrank daily. Start with the easy questions and slowly trump the difficulty up. You will be so amazed at how good you become in two months.
I'll make sure to check hackerrank this night too. I've tried to solve certain problems in the past on for loops and failed.lol. But I'll try again. Thanks man!
Re: Data Structures And Algorithms: A Beginner's Journey. by tensazangetsu20(m): 9:53pm On Jun 01, 2020
Rafoski:
I'll make sure to check hackerrank this night too. I've tried to solve certain problems in the past on for loops and failed.lol. But I'll try again. Thanks man!
It's like that initially. When I started the first two questions were so hard and that was warm up but now I make sure to solve at least 3 daily. It's fun.
Re: Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 10:04pm On Jun 01, 2020
ThreeBlackBird:
Following diligently.

I wish to stay up and download videos too but my sleepy head is sleepy already. grin I have already started with the syntax of Javascript though. The FreeCodeCamp guy who takes Javascript is just too quick for my liking.

lol. You know, I tried JavaScript last year(I was going to be a full stack developer) but the frameworks confused me and I got tired and left web development. But I'll encourage you to just stick to the tutorial and make a list of all the syntax you have learned so far and what they do in and out of context. Then try to use them in small calculations and DOM responsiveness.
Re: Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 10:06pm On Jun 01, 2020
tensazangetsu20:

It's like that initially. When I started the first two questions were so hard and that was warm up but now I make sure to solve at least 3 daily. It's fun.
Gbam! I'm hyped up. I'm surely going to build good habits like this.
Re: Data Structures And Algorithms: A Beginner's Journey. by Nobody: 10:10pm On Jun 01, 2020
Rafoski:
lol. You know, I tried JavaScript last year(I was going to be a full stack developer) but the frameworks confused me and I got tired and left web development. But I'll encourage you to just stick to the tutorial and make a list of all the syntax you have learned so far and what they do in and out of context. Then try to use them in small calculations and DOM responsiveness.

There's just no going back for me. I find it so interesting after C++ made life difficult for me. Many of the C++ syntax are used in Javascript. Thanks for the advice.

2 Likes

Re: Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 10:20pm On Jun 01, 2020
ThreeBlackBird:


There's just no going back for me. I find it so interesting after C++ made life difficult for me. Many of the C++ syntax are used in Javascript. Thanks for the advice.
That's the spirit man. We'll move forward with every tiny step in the right direction.

1 Like

Re: Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 8:11pm On Jun 02, 2020
Day 01.

This morning I stayed up from 00:00 till about 2:00 trying to download the video course which was about 8 hours long and a seemingly large file. At some point, the download stopped without my notice lol. I almost lost about 400+MB to the wind. But I downloaded the video and the book all the same. Once again, the resources I make use of are a video and a book. " A Common-Sense Guide To Data Structures and Algorithms" by Jay Wengrow and a video on YouTube from freeCodeCamp.
<hr/>

What I learned today.

From the book;

A Data Structure is a way of organizing data and the most basic data structure is an array. Most data structures are used in four basic ways;
i. Reading data from the data structure
ii. Searching for data in the data structure
III. Inserting data to the structure
iv. Deleting data from the data structure.

When any of these operations are used with a data structure, we'd like to know how fast the operation is. How much time it takes.
When we measure how fast an operation is, we don't measure it terms of real life time but by how many steps it takes to complete the operation. Why? Because runtime speed differs according to hardware of different computers. A computer with more RAM and processing power would beat any computer with lower specifications in terms of time.
It is assumed that if an operation takes 3 steps to run, it'll run faster than an operation with 40 steps on all hardware. Measuring the speed of an operation is also known as measuring its time complexity.

From the video;
He talked about Abstract Data Types which are an abstraction of a data structure which provides an interface to which a data structure must adhere. What the heck is that? It's basically an abstract way to represent data structures to give them a structure of their own. We have Lists, Queues, Maps.
Big-O Notation.
He said; "Big-O Notation gives an upper bound of the complexity in the worst case, helping to quantify performance as the input size becomes arbitrarily large". Na wa o. Upper bound in layman math means the highest value of a set. So it means the highest value of the time complexity in the worst case and when the input size becomes very large(infinitesimal). phew! I'm trying to simpilfy but I know I've missed some parts of the definition but eh!

There's the constant time O(1), the Linear time O(n) et cetera. I would like to share everything but I've wasted too much time typing all these but that's today's account, if you're following the thread, do well to contribute and correct what you see as wrong. I like to keep an open mind.
Re: Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 8:04pm On Jun 03, 2020
Day 02.

Day 2 and my battery is 2%-Literally. Today's been dark because we haven't had any power supply from yesterday evening till now. My phone went really low, it still is. But I managed to read about 4 pages of the book that talked about how many steps it takes to either delete, read, search or insert data to or from an array. To read from an array, it's a one step process. To search an array, that's a function of the position of the data in a designated memory address(cell block), when you're using linear search. To delete data from the array, the computer looks for the particular index storage in the memory address and deletes it by fixing some other data there, some form of re-arrangement. It almost the same process with insertion of data, it's all about re-arrangement of data in the cell blocks. Then the next data structure under consideration is a set. Mathematically, it's a collection of objects and stuff. So, hopefully tomorrow go better. But I'm off to watch the video course on my semi-desktop PC lol.(bad battery).
Regardless of what happens in the day, I'll still drop daily accounts of the little I learned.
Re: Data Structures And Algorithms: A Beginner's Journey. by gbolly1151(m): 10:13pm On Jun 03, 2020
Following your thread.

1 Like

Re: Data Structures And Algorithms: A Beginner's Journey. by scarplanet(m): 2:16pm On Jun 04, 2020
Paying attention....

1 Like

Re: Data Structures And Algorithms: A Beginner's Journey. by DriggityDre: 3:56pm On Jun 04, 2020
Nice. Following..

1 Like

Re: Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 8:12pm On Jun 04, 2020
Day 03

The last two days have been somewhat crazy. We've still not had power supply but earlier in the evening, the EDC here gave us four minutes of power supply for the whole day lol-how amazing. I'm sure theyll get their groove on by the end of the day. Okay, what did I learn yesterday evening from the video? Big-O notations for some algorithms. After looking at some algorithms that were used as examples, I came to the conclusion that the Big-O of any function is the number of n(s) you can find in the function. Just count the number of n(s) and raise it to the order(power). So, if I have 2 ns in an algorithm, that means it's O(n^2). Now, this is not conventional, it's merely a pattern I observed. Plus it doesn't work in the cases of logarithmic functions. But the Big-O of any function is found either graphically or by deduction. I don't yet know how to deduce the time complexity of functions but I'm learning. Below are some examples of algorithms from the video and their Big-O's.
Finding all subsets of a set-O(2^n)
Finding all permutations of a string-O(n!)
Sorting using mergesort- O(n log(n))
Okay, there they are. He talked about Static and Dynamic arrays, I talked about arrays in day 01 ba? I can't remember but it's pretty much the same content except I didn't mention dynamic arrays. Dynamic arrays do not contain a fixed length like static arrays. They are gotten from static arrays. That's the little I can share, there are many examples and codes from the video and in my notebook. But that's today's account.
In case you're wondering how I'm able to charge my device, we turn on the generator in my house by 7:00 and before we had our power problem, there was a power surge that spoiled my phone's charger so I can only charge with my laptop and that's really slow. So, I'll be going to the video course once I leave here.
Re: Data Structures And Algorithms: A Beginner's Journey. by gbolly1151(m): 9:54pm On Jun 04, 2020
Rafoski:
Day 03

The last two days have been somewhat crazy. We've still not had power supply but earlier in the evening, the EDC here gave us four minutes of power supply for the whole day lol-how amazing. I'm sure theyll get their groove on by the end of the day. Okay, what did I learn yesterday evening from the video? Big-O notations for some algorithms. After looking at some algorithms that were used as examples, I came to the conclusion that the Big-O of any function is the number of n(s) you can find in the function. Just count the number of n(s) and raise it to the order(power). So, if I have 2 ns in an algorithm, that means it's O(n^2). Now, this is not conventional, it's merely a pattern I observed. Plus it doesn't work in the cases of logarithmic functions. But the Big-O of any function is found either graphically or by deduction. I don't yet know how to deduce the time complexity of functions but I'm learning. Below are some examples of algorithms from the video and their Big-O's.
Finding all subsets of a set-O(2^n)
Finding all permutations of a string-O(n!)
Sorting using mergesort- O(n log(n))
Okay, there they are. He talked about Static and Dynamic arrays, I talked about arrays in day 01 ba? I can't remember but it's pretty much the same content except I didn't mention dynamic arrays. Dynamic arrays do not contain a fixed length like static arrays. They are gotten from static arrays. That's the little I can share, there are many examples and codes from the video and in my notebook. But that's today's account.
In case you're wondering how I'm able to charge my device, we turn on the generator in my house by 7:00 and before we had our power problem, there was a power surge that spoiled my phone's charger so I can only charge with my laptop and that's really slow. So, I'll be going to the video course once I leave here.
If

f(n) = n + n

That doesn't mean the Big - O is n^2 ,the big - O is (n)
Re: Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 10:44pm On Jun 04, 2020
gbolly1151:

If

f(n) = n + n

That doesn't mean the Big - O is n^2 ,the big - O is (n)

I mentioned it was a pattern I observed in the algorithms that were used as examples and it was not conventional, it naturally doesn't make sense. But I have to assign patterns to learn how to carefully deduce the correct time complexities and I don't know how yet.
Re: Data Structures And Algorithms: A Beginner's Journey. by Anonime1105(m): 4:54pm On Jun 05, 2020
Great thread bro

We are on the same path.
Am currently learning java, I started a few weeks back.
I brushed through some books in DS & A but they seem kind of complex for me at this stage so I decided to get some prerequisite knowledge before diving in.

Are you good at maths? cos I got to find out that I need to get a good grasp of Discrete mathematics to fully harness the power of DS & A.

In addition to java am also brushing up my maths skills.
Re: Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 5:16pm On Jun 05, 2020
Anonime1105:
Great thread bro

We are in the same path.
Am currently learning java, I started a few weeks back.
I brushed through some books in DS & A but they seem kind of complex for me at this stage so I decided to get some prerequisite knowledge before diving in.

Are you good at maths? cos I got to find out that I need to get a good grasp of Discrete mathematics to fully harness the power of DS & A.

In addition to java am also brushing up my maths skills.
I'm glad there's a Java guy here. Welcome to the thread man. Few weeks ago? That's amazing, how's it coming for you?
If I'm good at mathematics? I'd say "a little". I currently do mathematical analysis as a course in my college so I'm familiar with certain concepts like set theory for example. When I'm not learning DS & A, I'm learning mathematics. I saw analysis as a foundation for the understanding of logic and discrete mathematics and that's why I stuck to it. Like you, I'm brushing my math skills in addition to learning DS & A. smiley
Re: Data Structures And Algorithms: A Beginner's Journey. by tensazangetsu20(m): 5:35pm On Jun 05, 2020
Anonime1105:
Great thread bro

We are on the same path.
Am currently learning java, I started a few weeks back.
I brushed through some books in DS & A but they seem kind of complex for me at this stage so I decided to get some prerequisite knowledge before diving in.

Are you good at maths? cos I got to find out that I need to get a good grasp of Discrete mathematics to fully harness the power of DS & A.

In addition to java am also brushing up my maths skills.
Get really good at Java. Knows it's syntax inside out. You can always learn data structures and algorithms but learn the language of your choice very very well.

1 Like

Re: Data Structures And Algorithms: A Beginner's Journey. by Anonime1105(m): 5:48pm On Jun 05, 2020
tensazangetsu20:

Get really good at Java. Knows it's syntax inside out. You can always learn data structures and algorithms but learn the language of your choice very very well.

Ok, I would do that, thanks for the tip. smiley
Re: Data Structures And Algorithms: A Beginner's Journey. by Anonime1105(m): 5:56pm On Jun 05, 2020
Rafoski:

I'm glad there's a Java guy here. Welcome to the thread man. Few weeks ago? That's amazing, how's it coming for you?

It has been an interesting one, sometimes frustrating but definitely interesting.
I love java, it's a beautiful language.
Can you recommend some Java learning resources, books and videos?



If I'm good at mathematics? I'd say "a little". I currently do mathematical analysis as a course in my college so I'm familiar with certain concepts like set theory for example. When I'm not learning DS & A, I'm learning mathematics. I saw analysis as a foundation for the understanding of logic and discrete mathematics and that's why I stuck to it. Like you, I'm brushing my math skills in addition to learning DS & A. smiley

Nice one bro, keep up the flame of motivation! wink
Re: Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 8:03pm On Jun 05, 2020
Anonime1105:


It has been an interesting one, sometimes frustrating but definitely interesting.
I love java, it's a beautiful language.
Can you recommend some Java learning resources, books and videos?



Nice one bro, keep up the flame of motivation! wink
I think it's a thing with learning, especially something logical. I get frustrated even with mathematics man. But the joy comes when you finally get it! Aaah cheesy
Resources? NewBoston, it's a channel on YouTube. I downloaded their Java playlist and a guy named Bucky takes the course and I can recommend it to anyone. It's only to help the learner become familiar with the syntax. He does some easy calculations and stuff to help the learner understand the use of syntax in specific situations to reduce ambiguity and too much code. Then "Java for Dummies" is another book I can recommend. Although books can be verbose in an attempt to simplify things but it's important for understanding correctly. There are others but I can't remember them because I didn't really use them.

I'm trying to keep up the flame of motivation, we'll all need it to enjoy what we do.
Re: Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 8:41pm On Jun 05, 2020
Day 04

What did I learn today? I spent a lot of time trying to understand the code for the implementation of dynamic arrays from the video, I got tired and decided to go out to see a friend-prior to today, I had not gone out since the last three months. Although I could understand certain methods from the source code, some other sections looked completely strange with the use of syntax. I never see am before. sad Exception handling, type casting, instance variables, they were used in different ways here. But I left it o. I'll come back to it.
From the video, the guy moved to the next topic, singly and doubly linked lists. I stopped the video here because that topic came later in the book. In the book, I was looking into sets. Sets are data structures that do not allow duplicate values to be contained in it. He talked further on the steps taken to search,read, insert and delete data from sets. The next chapter was about algorithms. An ordered array is an array that stores value in order of magnitude or something(simply put, ascending or descending). So he made an algorithm to arrange values in the array. That's the summary of today's account. Your boy is tired. Very.
Re: Data Structures And Algorithms: A Beginner's Journey. by Ernest4321(m): 2:47am On Jun 06, 2020
Could you please refer me to that particular video from freebootcamp you are using
Rafoski:
Day 01.

This morning I stayed up from 00:00 till about 2:00 trying to download the video course which was about 8 hours long and a seemingly large file. At some point, the download stopped without my notice lol. I almost lost about 400+MB to the wind. But I downloaded the video and the book all the same. Once again, the resources I make use of are a video and a book. " A Common-Sense Guide To Data Structures and Algorithms" by Jay Wengrow and a video on YouTube from freeCodeCamp.
<hr/>

What I learned today.

From the book;

A Data Structure is a way of organizing data and the most basic data structure is an array. Most data structures are used in four basic ways;
i. Reading data from the data structure
ii. Searching for data in the data structure
III. Inserting data to the structure
iv. Deleting data from the data structure.

When any of these operations are used with a data structure, we'd like to know how fast the operation is. How much time it takes.
When we measure how fast an operation is, we don't measure it terms of real life time but by how many steps it takes to complete the operation. Why? Because runtime speed differs according to hardware of different computers. A computer with more RAM and processing power would beat any computer with lower specifications in terms of time.
It is assumed that if an operation takes 3 steps to run, it'll run faster than an operation with 40 steps on all hardware. Measuring the speed of an operation is also known as measuring its time complexity.

From the video;
He talked about Abstract Data Types which are an abstraction of a data structure which provides an interface to which a data structure must adhere. What the heck is that? It's basically an abstract way to represent data structures to give them a structure of their own. We have Lists, Queues, Maps.
Big-O Notation.
He said; "Big-O Notation gives an upper bound of the complexity in the worst case, helping to quantify performance as the input size becomes arbitrarily large". Na wa o. Upper bound in layman math means the highest value of a set. So it means the highest value of the time complexity in the worst case and when the input size becomes very large(infinitesimal). phew! I'm trying to simpilfy but I know I've missed some parts of the definition but eh!

There's the constant time O(1), the Linear time O(n) et cetera. I would like to share everything but I've wasted too much time typing all these but that's today's account, if you're following the thread, do well to contribute and correct what you see as wrong. I like to keep an open mind.
Re: Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 6:49am On Jun 06, 2020
Ernest4321:
Could you please refer me to that particular video from freebootcamp you are using
It's on YouTube. I don't have the link, I used YouTube Go. But if you use the keywords "Data Structures and Algorithms in Java" you'll find an 8-hour long video from freeCodeCamp.
Re: Data Structures And Algorithms: A Beginner's Journey. by Anonime1105(m): 7:53am On Jun 06, 2020
Rafoski:

I think it's a thing with learning, especially something logical. I get frustrated even with mathematics man. But the joy comes when you finally get it! Aaah cheesy
Resources? NewBoston, it's a channel on YouTube. I downloaded their Java playlist and a guy named Bucky takes the course and I can recommend it to anyone. It's only to help the learner become familiar with the syntax. He does some easy calculations and stuff to help the learner understand the use of syntax in specific situations to reduce ambiguity and too much code. Then "Java for Dummies" is another book I can recommend. Although books can be verbose in an attempt to simplify things but it's important for understanding correctly. There are others but I can't remember them because I didn't really use them.

I'm trying to keep up the flame of motivation, we'll all need it to enjoy what we do.

Thanks bro, Bucky is a great teacher.
Re: Data Structures And Algorithms: A Beginner's Journey. by Ernest4321(m): 1:41pm On Jun 06, 2020
Tnx bro
Rafoski:

It's on YouTube. I don't have the link, I used YouTube Go. But if you use the keywords "Data Structures and Algorithms in Java" you'll find an 8-hour long video from freeCodeCamp.

1 Like

Re: Data Structures And Algorithms: A Beginner's Journey. by Rafoski: 5:32pm On Jun 16, 2020
Relapse.

Today, I have resumed the DS & A journey and back to business. For one week plus, I didn't touch anything that involved DS & A. It's 50% laziness/will, 40% environment and about 10% habit. Anyways, I know that if you really want something, you'll keep at it regardless of what happens, internal or external. I can actually go into the science of why I relapsed. Cue, Response, Reward, that's the foundation of habits. Basically, my habitual pattern got interrupted at some point. Well, I'm back.
Re: Data Structures And Algorithms: A Beginner's Journey. by Anonime1105(m): 8:13pm On Jun 16, 2020
Welcome Back bro

1 Like

Re: Data Structures And Algorithms: A Beginner's Journey. by Anonime1105(m): 8:31pm On Jun 16, 2020
Ernest4321:
Could you please refer me to that particular video from freebootcamp you are using
This the DS & A Video....

https://www.youtube.com/watch?v=RBSGKlAvoiM&list=WL&index=27&t=20005s

1 Like

(1) (2) (Reply)

Another Programming Challenge / Please, I Need A Step-by-step Tutorial For Developing Android Apps / Mehn Not Easy Oooo I Coded It A To Z

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 2
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.