Skip to content

Data Structures and Algorithms course: from Big-O to graphs

Learn how the common data structures work inside, how to measure an algorithm’s time and memory, and how to choose the right approach for a new problem. Every structure is drawn and traced by hand, then written from scratch in the language your course uses, live and one-to-one.

  • First 30-minute class free
  • Live, one-to-one, online
  • Female tutors on request
  • Reply within 24 hours

The DSA course at a glance

Short answers to the questions students and parents ask first. Each one is explained in more detail further down the page.

What are data structures and algorithms?

A data structure is a way of organising data in memory, such as an array, a linked list, a hash table, a tree or a graph. An algorithm is a step-by-step method for solving a problem with that data, such as searching or sorting. Choosing the right pair is what makes a program fast.

Who should learn DSA?

University students on a DSA or algorithms course, students preparing for technical interviews or coding tests, and programmers who have finished OOP and want the next core subject.

What do I need before I start?

Confident programming in C++, Java or Python, including loops, functions and arrays, and a basic understanding of classes and objects. School algebra is enough maths to begin.

Which topics does the course cover?

Time and space complexity, arrays and linked lists, stacks and queues, recursion, searching and sorting, hashing, trees, graphs, and algorithm design with regular problem-solving practice.

How are the classes delivered?

Live and one-to-one on Microsoft Teams or Zoom, in C++, Java or Python. You trace each structure on a shared whiteboard, then write the code yourself while the tutor reviews it.

How can I start learning DSA?

Book the free 30-minute introductory class with the form on this page or on WhatsApp. Tell us your course or the test you are preparing for; we reply within 24 hours.

Who should take this DSA course?

  • University students on a Data Structures or Algorithms course
  • Students preparing for technical interviews or online coding tests
  • Students who passed OOP and want the next core course
  • A Level students and self-taught programmers who want a head start
  • Final-year students whose project needs efficient searching or routing

Where students often get stuck

  • Big-O notation that feels like abstract maths
  • Pointers and references that break a linked list or tree
  • Recursion that is hard to follow past the first call
  • Knowing how quicksort works, but not being able to write it
  • Not recognising which data structure a new problem needs
  • Solutions that work on small tests and time out on large ones

Prerequisites

  • Confident programming in one language: C++, Java or Python. You can write loops, functions and arrays without help.
  • Basic Object-Oriented Programming: classes and objects. Linked lists and trees are built from them.
  • C++ students: pointers and references. If they are new, the tutor covers them first.
  • School algebra. Logarithms and sums are explained when they first appear.

What you need for lessons

  • A laptop or desktop computer. A phone or tablet is not enough for writing code.
  • A stable internet connection and Microsoft Teams or Zoom.
  • A quiet place where you can share your screen and talk with the tutor.

DSA course syllabus

The topics in the order they are usually taught. The tutor adjusts the order and depth to your level, and to your school or university syllabus if you share it.

  1. Algorithm analysis: time and space complexity

    • Counting steps, and why we ignore constants
    • Big-O, Big-Omega and Big-Theta
    • Common growth rates, from O(1) to O(2ⁿ)
    • Best, average and worst cases, and amortised cost
    • Space complexity, including the call stack
  2. Arrays and linked lists

    • Static and dynamic arrays, and how resizing works
    • Singly, doubly and circular linked lists
    • Inserting, deleting and reversing a list
    • When an array beats a linked list, and the other way round
  3. Stacks and queues

    • Stacks with arrays and with linked lists
    • Queues, circular queues and deques
    • Priority queues
    • Classic uses: undo, bracket matching, evaluating expressions
  4. Recursion

    • Base cases and recursive cases
    • Tracing the call stack by hand
    • Recurrence relations and their running time
    • Divide and conquer
  5. Searching and sorting

    • Linear search and binary search
    • Bubble, selection and insertion sort
    • Merge sort, quicksort and heap sort
    • Stability, sorting in place, and choosing a sort
  6. Hashing

    • Hash functions and hash tables
    • Collisions: chaining and open addressing
    • Load factor and rehashing
    • Maps and sets in your language’s library
  7. Trees

    • Binary trees and traversals: in-order, pre-order, post-order, level-order
    • Binary search trees: search, insert and delete
    • Balanced trees, introduced through AVL rotations
    • Heaps and heap sort
  8. Graphs

    • Adjacency matrices and adjacency lists
    • Breadth-first and depth-first search
    • Shortest paths with Dijkstra’s algorithm
    • Minimum spanning trees and topological sort
  9. Algorithm design and problem-solving practice

    • Greedy algorithms, and when they fail
    • Dynamic programming: from recursion to a table
    • Backtracking
    • Patterns: two pointers, sliding window, prefix sums
    • Reading a problem, choosing an approach and explaining it aloud

How fast is each operation?

The question at the heart of DSA. This table shows the usual cost of common operations in Big-O notation. In lessons you work each of these out yourself, rather than memorising the table.

Common data structure operations and algorithms with their time complexity
Structure or algorithmOperationTimeNote
ArrayRead by indexO(1)The position is calculated directly
ArraySearch, unsortedO(n)May have to check every element
Dynamic arrayAdd at the endO(1) amortisedAn occasional resize copies every element
Linked listInsert at the headO(1)Reaching position i first takes O(n)
Stack or queuePush, pop, enqueue, dequeueO(1)Only the ends are touched
Hash tableInsert, look upO(1) averageO(n) in the worst case, when many keys collide
Balanced binary search treeSearch, insert, deleteO(log n)An unbalanced tree can degrade to O(n)
Binary heapInsert, remove the minimumO(log n)Reading the minimum is O(1)
Binary searchFind in a sorted arrayO(log n)Halves the range at each step
Merge sortSort n itemsO(n log n)Needs O(n) extra memory
QuicksortSort n itemsO(n log n) averageO(n²) in the worst case; sorts in place
Breadth-first or depth-first searchVisit every vertexO(V + E)With an adjacency list; V vertices, E edges

Big-O describes how the cost grows as the input grows, not the exact time in seconds.

A practical way to learn

Trace it by hand
Before any code, you draw the structure and step through the algorithm on paper or a shared whiteboard, so you know what each line has to do.
Write it from scratch
You implement each structure yourself in your course’s language, then compare it with the version in the standard library.
Analyse every solution
Every program ends with the same questions: how fast is it, how much memory does it use, and could it be better?
Practise on new problems
You solve problems you have not seen before, in the style of your exams or coding tests, and explain your approach before you code it.

Practice exercises and projects

Examples of exercises used in lessons. The tutor picks ones that suit your course, and you write every line yourself.

  • Undo and redo for a text editor

    Keep a history of edits so the last change can be undone and redone, with a limit on how much is remembered.

    Practises

    • Stacks
    • Linked lists
    • Complexity
  • A phone book that searches fast

    Store thousands of contacts, then compare searching a sorted array with binary search against a hash table you write yourself.

    Practises

    • Binary search
    • Hashing
    • Sorting
  • Route finder on a city map

    Model streets as a weighted graph and find the shortest route between two places, then explain why Dijkstra’s algorithm works.

    Practises

    • Graphs
    • Priority queues
    • Shortest paths
  • Sorting race

    Implement four sorting algorithms, time them on 1,000, 10,000 and 100,000 items, and check the results against their Big-O.

    Practises

    • Sorting
    • Recursion
    • Algorithm analysis

Your assignments stay your own

The tutor teaches, traces and reviews with you, but does not write graded assignments, contest solutions or test answers for you to submit.

Read our Academic Integrity Policy

What you can expect to learn

  • State and justify the time and space complexity of your own code
  • Implement arrays, linked lists, stacks, queues, hash tables, trees and graphs from scratch
  • Write and trace recursive solutions without losing track of the call stack
  • Choose a suitable data structure for a problem, and explain the trade-off
  • Apply searching, sorting, graph traversal, greedy and dynamic programming techniques
  • Talk through an approach clearly, as exams, vivas and interviews ask

These are the aims of the lessons. Progress depends on where you start and how much you practise, and we never promise grades or results.

Suitable learning levels

DSA is an advanced course: it assumes you already program confidently. Students usually come to it at one of these points.

  • Level: Intermediate

    Taking your first DSA course

    Your university course has started with complexity, lists and stacks. Lessons follow its outline and make each structure concrete before the exam.

  • Level: Advanced

    Preparing for interviews or coding tests

    You know the structures but freeze on new problems. Lessons focus on recognising patterns, timed practice and explaining your approach.

  • Level: Advanced

    Graphs, dynamic programming and harder topics

    You are on an algorithms course or want to go further. Lessons cover graph algorithms, greedy methods, dynamic programming and analysing recurrences.

Where to go next

DSA sits at the centre of a Computer Science degree. These courses come before it or build on it.

  • Object-Oriented Programming

    Classes, inheritance and design. Take this first if linked structures built from classes feel unfamiliar.

  • C++ Programming

    Pointers, references and memory, which many university DSA courses expect you to use in C++.

  • Computer Science

    Operating systems, databases, networks and the other university subjects that use these structures.

  • FYP Mentoring

    Final-year students: choose the right structures and algorithms for your project with a mentor.

Free guides

Your DSA tutor

DSA classes are taught by the programming tutors below. Each profile is published with the tutor’s consent. When you get in touch, we suggest a tutor who knows your course language.

  • Portrait of Ali Sher Abbasi, tutor at My Subject Hub

    Ali Sher Abbasi

    Tutor at My Subject Hub

    • BS (Computer Science), PMAS Arid University Rawalpindi
    • Data Structures and Algorithms certification, Zero To Mastery
    • Web development courses, Frontend Masters
    Teaching experience
    5 years
    Teaching languages
    English and Urdu
    Computer science and programming
    • Programming Fundamentals
    • C and C++
    • Java
    • JavaScript and Web Development
    • Object-Oriented Programming
    • Data Structures and Algorithms
    • Advanced Computer Science
    • Cybersecurity Fundamentals
    • FYP Mentoring
    School and college subjects
    • Mathematics
    • Science, Physics, Chemistry and Biology
    • English
    • Urdu
    Teaching approach
    Friendly and patient. Daily tasks and assignments, with quizzes to check progress, and we move to the next topic only when the previous one is crystal clear.
    Curricula and boards
    All curricula and boards
    Online availability
    Any time that suits the student
See all tutors

Fees and monthly plans

Per subject, per month, in US, Canadian, Australian or New Zealand dollars, and in Saudi riyals with 20% off for students in Saudi Arabia. Every plan starts with a free trial class.

Show prices for

International (USD)

For students in the United States and every other country without its own price list, in US dollars.

Each plan is for one subject. A second subject is a second plan.

  • First class free in every subject (30 minutes)
  • 15-day refund if the student isn’t happy with us, or for another valid reason
See all fees and policies

Questions · 9

DSA course questions

The questions students and parents ask us most, filed where you can find them. Pull a card to read it.

Where can I get help understanding data structures and algorithms?

My Subject Hub gives live one-to-one online help with data structures and algorithms (DSA), in C++, Java or Python. Lessons follow your university course outline or test and cover Big-O, linked lists, stacks, queues, hashing, trees, graphs and sorting, and you practise by writing and testing each one yourself. The first 30-minute class is free.

Which language do you use for DSA?

C++, Java or Python, the one your course or test uses. The ideas are the same in every language; C++ also makes you handle pointers and memory yourself, which many university courses expect.

What is Big-O notation?

A way of describing how an algorithm’s running time or memory grows as the input grows, ignoring constant factors. O(n) means the work grows in proportion to the input; O(log n) means it grows very slowly, as in binary search. You learn to work it out from your own code in the first topic.

Do I need to be good at maths?

School algebra is enough to start. Logarithms, sums and proofs by induction are explained when a topic needs them, with examples from code rather than abstract exercises.

Can you help me prepare for coding interviews or tests?

Yes. The tutor can focus on common problem types, timed practice, explaining your approach aloud and analysing complexity, alongside the data structures behind them.

What should I know before starting?

You should write programs with loops, functions and arrays without help, and know what a class and an object are. If classes are new, a few OOP lessons first will make linked structures much easier.

Read about the Object-Oriented Programming course

Can lessons follow my university course?

Yes. Share your course outline and past papers, and the tutor follows its order and notation, including the pseudocode style your exams use.

How long does it take, and how much does it cost?

There is no fixed length; it depends on where you start and what your course or test covers. The tutor suggests a plan after the free 30-minute class. DSA uses the monthly plans, from ⁦$40⁩ a month (⁦SAR 120⁩ in Saudi Arabia).

See fees and plans

Can I ask for a female tutor?

Yes. Female tutors are available on request, and so are male tutors. Tell us your preference when you get in touch, and we confirm a matching tutor before the free class.

Not in the drawer? Send us your question and we reply within 24 hours.

Ask us

Book a free introductory DSA class

Meet the tutor, trace a structure together, and find out where to start. Tell us your course or test, and we will arrange a time.

What happens next

  1. We reply within 24 hours, on WhatsApp or by email.
  2. You agree a time for the free 30-minute class with the tutor.
  3. In the class the tutor checks your level, you write a little code together, and you get a suggested starting point.
  4. There is no obligation to continue after the free class.

Tell us about the student

Just your phone number or email. That’s all we need; everything else is optional.

  • No credit card required
  • Free 30-minute class
  • Reply within 24 hours

We use these details only to reply to you and arrange classes. How we handle your information