r/computerscience • • Jan 28 '20

Data Structure Infographic

Post image
574 Upvotes

33 comments sorted by

124

u/bluemelon555 Jan 29 '20

I’d have chosen a different picture for graph maybe

71

u/[deleted] Jan 29 '20

tbh for all of them

10

u/S2tha3l Jan 29 '20

It's just stock stuff from canva, I can't draw tbh. If someone wants to provide better clip art that is more CSey I'll happily update the image in the blog article and give them contribution credit.

0

u/[deleted] Jan 29 '20

[deleted]

6

u/S2tha3l Jan 29 '20

That would be awesome if you don't mind. The more relevant pictures could help the data structures stick better.

As much as I like the tree for a tree im not stuck to it.

0

u/[deleted] Jan 29 '20

[deleted]

7

u/S2tha3l Jan 29 '20

No inconvenience at all, wasn't expecting the offer. It's appreciated.

0

u/[deleted] Jan 29 '20

[deleted]

7

u/S2tha3l Jan 29 '20

No problem Terraria, thanks for giving it a try none the less. I can search through the canva library more

5

u/Bitwise__ Jan 29 '20

Lmao. I’ll dm you in 12 hours. I can get good pictures drawn when I wake up in the morning, will be like 30 mins out of my day so why not.

6

u/S2tha3l Jan 29 '20

Lol good point! It doesn't look like a CS graph at all

18

u/Akerlof Jan 29 '20

It's actually misleading, because it IS a picture of what most people think of as a graph, which is confusing if you're trying to tell them that it's something else.

Try searching for an org chart or a mind map to use as an example.

3

u/S2tha3l Jan 29 '20

I found a better one and updated the image on the blog article. I can't edit the picture here though.

Thanks to the reddit community for upvoting the hell out of his comment and let me realize the concern!

1

u/Akerlof Jan 29 '20 edited Jan 29 '20

Excellent!

<Edit:> And I'll add that what you initially put in is a good example of graph coloring. But that's more math than CS, and even if you had described it, it's as confusing as showing an El Camino when trying to explain a pickup truck.

20

u/Berlibur Jan 29 '20

Graph pic does not make sense here

4

u/S2tha3l Jan 29 '20

word! I'm an SDE by trade, just started getting into making infographs for my blog and wanted to share this because of how much data structures are emphasized in CS and interviews

I can only pray my designer eye gets better, but I assure you it has been changed ;)

6

u/Berlibur Jan 29 '20

Just remember that the design should underline the message, here it is misleading for people that are not familiar with graphs in a more mathematical sense. Good luck!

8

u/psyx__ Jan 29 '20

First week in data structures, thanks for the diagram.

8

u/not_creative_enuf Jan 29 '20

Just remember, hashmaps for everything.

4

u/S2tha3l Jan 29 '20

I've noticed dynamic programming and depth first searches seem to be the new hotness in coding contests as well

2

u/psyx__ Jan 29 '20

What are coding contests like? And do you find them locally? What level of proficiency should a new programmer have before participating in one?

4

u/S2tha3l Jan 29 '20 edited Jan 29 '20

I've recently been participating in the weekly leetcode.com contests on Saturday's at 9:30 est.

They give 4 problems that progress in difficulty and give you 90 minutes to get as far as you can on them. Each problem has a certain amount of points associated with them. You get scored based on how many you complete and how quickly you finish them. So if you and I both finish problems one and two but you do it faster than I do, you will be ahead of me on the leaderboard.

Once you become a rockstar at those you can go participate at Google's annual contest. https://codingcompetitions.withgoogle.com/codejam I assume they give offers to people that do well on those during the season. You can work through archives too for practice.

Just to participate I'd recommend at least core data structure awareness and algorithm applications can at least get you the first of the four problems. The 2nd problem I'd rate as something you'd see during an interview that usually has a minor curveball on common coding algorithms. The third problem is usually challenging with some knowledge of more advanced algorithms like Dijkstra's shortest path and dynamic programming concepts. The fourth is hard as hell and I don't know how some people can finish all four problems within 30 minutes but it's important not to evaluate your current skill against someone else that has been doing it every week for five years already.

I recently started participating in the weekly contests about a month ago and was able to finish the first two barely but was blank on the last two. This last week I finished 1 and 2 much quicker and completed problem 3 in a way that finished 85% of the test cases. There was an edge case in the shortest path I didn't cover that other people solved with two dimensional dynamic programming arrays. And the 4th one I had some idea of the theory but wasn't able to translate it to anything that resembled working code within the time limits. I doubt the algorithm knowledge to solve the 4th problem is something you'd need in typical software developer industry work, and if it is you would get more than 30 minutes to optimize it.

It's cool to be able to recognize the growth and see your scores increase. Leetcode has a very active community and boards where people discuss their implementation, approach to the problems, and people talk about how they prepared for interviews. I really enjoy working through problems on the site.

1

u/psyx__ Jan 29 '20

Sounds daunting and exciting all the same. I'll definitely give Leetcode contests a shot after learning more about data structures and algorithms. Thanks for the info✌

2

u/S2tha3l Jan 29 '20

On Leet code they have a large question bank that can be sorted by difficulty too. You can start out just by knocking out easy problems, then going up to mediums and eventually hard. They also have unranked 'virtual contests' where you can work through the old ones. There's lot of ways to prepare!

1

u/psyx__ Jan 29 '20

That's perfect, are there language specific problems? Or can you use whatever you're comfortable with?

2

u/S2tha3l Jan 29 '20

You can pick whatever you're comfortable. It's also a good way to practice syntax for other languages

1

u/veggiecobbins Jan 29 '20

Currrlently taking a data structures/algorithm courae so this is great. Thanks!

1

u/S2tha3l Jan 29 '20

Best wishes in your course veggie! Try to remember and learn the concepts for most the sorting algorithms too, that will come in handy! I personally always forget them from using libraries.

Also learn the two pointer algorithms such as reversing an array in o(n/2)

1

u/veggiecobbins Mar 03 '20

Cheers! Thanks!

1

u/Rhyto Jan 29 '20

Thanks, I'm 4 weeks in and I'm completely lost and dumfounded by this long-winded textbook.

Just snip me the definitions and examples and Bam, ready to go.

-1

u/piginpoop Jan 29 '20

All this theory never helped anybody

1

u/S2tha3l Jan 29 '20

I'm not sure my coworkers would agree ;)

0

u/[deleted] Jan 29 '20

I just want to say, and I really do mean this, fuck linked lists.

0

u/[deleted] Jan 29 '20

[deleted]

1

u/S2tha3l Jan 29 '20

Worst case retrieval time. But yes it's a valid point

0

u/[deleted] Jan 29 '20

[deleted]

1

u/S2tha3l Jan 29 '20

By definition you are correct but when we give interviews we expect candidates to describe best case, worst case, and average times.

0

u/[deleted] Jan 29 '20

[deleted]

1

u/[deleted] Jan 29 '20

You never know, same with bookmarks lmao