Data Structures, Algorithms, And Big O Notation! A Beginners Guide.

I may or may not regret this decision, but I’m sticking to it.

Data Structures, what are they?

below is an example of how to extract a value from this array
> catchPhrase[0]
"Big"
below is an example of how to extract a value from this hash
> characters['Android']
"Dorothy"
A visual aid for different data structures, these can even be nested inside one another.

What is an Algorithm?

below are some examples of different returns this function might have, this function uses the previously defined catchPhrase array by default.
> findIndexOfElement("Showtime!")
2
> findIndexOfElement("Not Present")
false

A Brief Description Of Big O Notation

Sadly this has absolutely nothing to do with Big O Notation, but I’m stubbornly keeping this analogy.
As you can imagine the runtime for this increases exponentially as the input increases because you are iterating through the entire array per element.

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store