Growing into Programming Through Algorithms and Data Structures
When I first started programming, I wasn’t sure it was something I could learn. The syntax felt
overwhelming, and I often thought code was just a mysterious black box. Over time, I realized
that programming isn’t about memorizing commands, but about building structure and design.
Once I began focusing on fundamentals like algorithms and data structures, the pieces started to
click. They gave me a framework to organize problems logically and break them down into steps
I could actually manage.
One of the first big lessons was that not all solutions are created equal. Early on, I thought a
search was just a search. But then I saw how linear search and binary search differ: one checks
each item one at a time, while the other cuts the problem in half with every step. For small lists,
the difference doesn’t matter much, but at scale, the gap is huge. Linear search is simple but slow
as data grows, while binary search is much faster but only if the list is sorted. The key is that
neither is always “better”; the right choice depends on the data and the task.
I saw this idea play out in an assignment where I created a linked list of cities I’ve lived in
Augusta, Charleston, Hollywood, Bellevue, and West Ashley. I inserted Charlotte at index 2 and
removed another city by position. If I had used an array, inserting in the middle would have
meant shifting multiple elements. But with a linked list, those changes were efficient and
straightforward. That exercise showed me how the structure itself can make certain operations
easier while trading off speed in other areas.
The biggest shift for me has been learning to stop thinking of programming as just “writing code
that works.” Instead, I now look at the problem and ask what operations I’ll be doing most. If I
need quick searching, a binary search or hash table makes sense. If I need frequent insertions and
deletions, a linked list is the right tool. If items need to be processed in order, a queue is the
natural choice. Queues follow a first-in/first-out approach, which is exactly how tasks arrive in
the real world like people waiting in line or jobs waiting for the processor. That structure
makes sure everything is handled fairly and in the order it arrived.
What once felt out of reach now feels manageable. By understanding algorithms and data
structures, I’ve moved from doubting whether I could ever program to actually enjoying the
process of solving problems with the right tools.
No comments:
Post a Comment