Algorithms Tutorials — Implementation in C, Data Structures and Algorithm Libraries

Flat diagram illustration showing sorting algorithm bar chart binary search tree and weighted graph network for algorithms tutorials in blue and white

Algorithms are the foundation of all software — the precise, step-by-step instructions that tell a computer how to solve a problem efficiently. Understanding algorithms is not just an academic exercise. It is what separates programmers who write code that works from engineers who write code that works fast, scales under load and handles complex problems elegantly. From sorting a list of names to finding the shortest path across a network, algorithms determine how well your software performs in the real world.

MYCPLUS has been publishing algorithm tutorials and implementation guides since 2004, with a particular focus on practical algorithm implementations in C and C++. This section covers the essential algorithms every programmer should understand — sorting, searching, graph traversal, tree operations and optimisation techniques — alongside practical data structure implementations and guides to established algorithm libraries used in professional C and C++ development.

With over 30 articles covering beginner through advanced algorithm concepts, you will find clear explanations of how each algorithm works, analysis of time and space complexity, working C source code implementations you can compile and study, and practical guides to algorithm libraries that save development time on real projects. Whether you are preparing for technical interviews, studying computer science fundamentals or optimising production code — start here.

What You’ll Learn

  • Sorting algorithms — bubble sort, merge sort, quicksort, heap sort and radix sort explained with step-by-step walkthroughs and working C implementations comparing performance and use cases
  • Searching algorithms — linear search, binary search, hash-based lookup and tree search techniques with practical C source code examples and complexity analysis
  • Graph traversal algorithms — breadth-first search, depth-first search, Dijkstra’s shortest path, Kruskal’s minimum spanning tree and practical graph algorithm implementations in C
  • Data structures for algorithms — arrays, linked lists, stacks, queues, binary trees and hash tables as the building blocks for efficient algorithm implementation in C and C++
  • Algorithm complexity and analysis — understanding Big O notation, time and space complexity, best and worst case analysis and choosing the right algorithm for your specific problem
  • C algorithm libraries — practical guides to established C algorithm libraries, standard library functions and reusable algorithm implementations for professional software development

Why MYCPLUS: Trusted by programmers and computer science students since 2004 — every algorithm tutorial includes working C source code implementations, complexity analysis and practical examples designed for both academic study and real-world software development.

Base 64 Encoding and Decoding

256-bit Serpent VB Implementation

This is a slow but working Visual Basic implementation of the 256-bit Serpent algorithm. Serpent was a finalist for Advanced Encryption Standard (AES) and appears to be a very secure powerful algorithm. The Advanced Encryption Standard, or AES, is a symmetric block cipher chosen by the U.S. government for the encryption of classified electronic data and is implemented in software and hardware throughout the world to encrypt sensitive data.

Quicksort in C

Quicksort Implementation in C

Quicksort is a widely used sorting algorithm known for its efficiency and simplicity. Developed by Tony Hoare in 1960, this sorting technique follows the “divide and conquer” paradigm which makes it a powerful tool for organizing data in ascending or descending order. Programmers find quicksort to be an excellent introduction to sorting algorithms due to its straightforward implementation and elegant design.

Scroll to Top