Back to Blog
1 min read August 17, 2021

Data Structures and Algorithms

V

Velda Kiara

Creative Engineer

I recently started in-depth learning Data Structures and Algorithms (DSA) and all I can say is it is tough, but I am actually getting the hang of different concepts. Going through different concepts of DSA reminded me of a conversation I had with a friend on why I thought this was nerve-wracking.

The conversation started off with a use case question on DSA based on a tray of eggs that needed to be taken from point a to point b. My answer was to take the tray of eggs from point a to point b. Clearly, my answer was ignorant of all factors involved in taking the eggs to point b from point a.

What I did not do, was ask questions like:

-What if on moving the tray, I tripped and a few of the eggs fell and broke?

If I asked the right questions I would be able to account for different situations.

What I learned from the conversation was that DSA is about asking the right questions and accounting for different use cases, especially edge cases.

Edge cases are situations where the inputs or outputs are out of what was originally planned. To exemplify, if you write an algorithm that removes duplicates from a list but does not account for null values then your code will break whenever there are null values present.

More to read

Enjoying my work? Buy me a piping hot chocolate

All photographs on this page were taken by V.Kiara — if you'd like to use them, please reach out first.