DEV Community

Cover image for Everything You Need to Know to Start Your Way as a Programmer
nedajahanfar
nedajahanfar

Posted on

Everything You Need to Know to Start Your Way as a Programmer

Finding Your Starting Point:

Finding a solid way to start programming can feel overwhelming.
You get lost in definitions, frameworks, and tutorials — and it’s hard to know where to begin.

But if we strip everything down to the most important foundation, one concept stands above all others: the algorithm.

What Is an Algorithm?

An algorithm is simply a set of steps used to solve a problem or create something.
It’s the sequence of actions you take to reach a result.

You use algorithms every day — even outside coding.

Making coffee: boil water → add coffee → pour → stir
Sorting your books: compare titles → arrange alphabetically

That’s all an algorithm is — a structured way to reach a goal.

What Makes a “Good” Algorithm?

_Not all algorithms are equal.
_Some take more time or use more memory than others.

A good algorithm is one that:

Solves the problem correctly
Uses the least possible time
Uses the least possible space

So how can we measure that?
That’s where Big O Notation comes in.

Big O Notation — Measuring Efficiency:

Big O tells us how the performance of an algorithm changes as the input grows.
It focuses on the worst-case scenario: how long (or how much memory) your code might take for n elements.

Here are the most common types:

O(1) => Constant => Always takes the same time, no matter the input size. (Best case!)

O(log n) => Logarithmic =>Still very efficient — time increases slowly as input grows.

O(n) => Linear => Time grows in proportion to input size.

O(n²) => Quadratic => Much slower — time grows dramatically as input increases.

Think of it like this:

Searching in a sorted list (binary search) → O(log n)
Looping through every item once → O(n)
Double nested loops → O(n²)

Algorithms and Data Structures:

Algorithms work on data — but the way we store and organize that data matters too.
That’s where data structures come in.

Different data structures (arrays, stacks, queues, linked lists, trees, etc.) are optimized for different operations.
For example:

Searching through an array might take O(n)
Searching through a hash table can be O(1)

Choosing the right structure can dramatically change performance.

What’s Next?

In this series, we’ll explore:
The most important data structures
Their time and space complexities (Big O)
Real LeetCode problems related to each topic
Pseudocode examples to understand how they work

By the end, you’ll not only know what each structure does — you’ll know when and why to use it.

Top comments (4)

Collapse
 
pascal_cescato_692b7a8a20 profile image
Pascal CESCATO

Excellent article! I'll read the rest as soon as it's published. However, if the complexity increases linearly (O(n) or O(n²)), perhaps a different data structure should be considered, right? In my opinion, a quadratic increase means that another approach could solve the problem with less complexity.

Collapse
 
nedajahanfar profile image
nedajahanfar

Great point! You’re absolutely right, choosing a different data structure can completely change the complexity.
For example, a search that’s O(n) with an array could drop to O(1) with a hash map.
I’ll definitely expand on that idea in the next article when we explore how structure choice impacts performance. Thanks for highlighting it

Collapse
 
pascal_cescato_692b7a8a20 profile image
Pascal CESCATO

You've got my mouth watering! I can't wait to read the next articles!

Collapse
 
farzad88 profile image
Farzad

Great! Thanks for sharing it.