Learning Path for Programming Journey. Start Now

Data Structures

Quick Sort in C

Similar to merge sort in C, quick sort in C follows the principle of decrease and conquer, or as it is often called, divide and conquer. The quicksort algorithm is a sorting algorithm that works by selecting a pivot point, and thereafter partitioning the number set, or array, around the pivot point.

Also known as partition-exchange sort, quicksort was developed by Tony Hoare, a British computer scientist, in 1959. Since its publishing in 1961, quicksort has become one of the top choices in sorting algorithms.

Read more

Binary Search in C

A binary search is a simplistic algorithm intended for finding the location of an item stored in a sorted list. There are a few variations to the binary search in C program, such as testing for equality and less-than at each step of the algorithm.

Binary search in C is an example of a simple process that can be used to dissolve complex problems. As such, it is an important foundational concept that you will find in almost all the good books on the C programming language.

Read more

Structure vs Union

In C/C++, Structures and Union are two user-defined data types. In this blog post, we will try to understand how they both work and how exactly are they different from each other.

Understanding a Structure (struct)

Struct is a user-defined data-type that’s used to store a combination of data which can potentially belong to different data-types. To explain further, think about how you can store information about a student in C/C++, where, you need to store the following parameters:

Read more