<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/EFPywAMDv" -->

---
title: 5 Sorting Algorithms Every Programmer Should Know
description: 5 Sorting Algorithms Every Programmer Should Know. Insertion, selection, bubble, merge, and quick sort. A sorting algorithm is used to rearrange a given array...
canonical: https://daily.dev/posts/5-sorting-algorithms-every-programmer-should-know-efpywamdv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 5 Sorting Algorithms Every Programmer Should Know | daily.dev
og:description: 5 Sorting Algorithms Every Programmer Should Know. Insertion, selection, bubble, merge, and quick sort. A sorting algorithm is used to rearrange a given array...
og:url: https://daily.dev/posts/5-sorting-algorithms-every-programmer-should-know-efpywamdv
og:image: https://api.daily.dev/og/posts/EFPywAMDv.png
og:image:alt: 5 Sorting Algorithms Every Programmer Should Know
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 5 Sorting Algorithms Every Programmer Should Know

**[Better Programming](https://daily.dev/sources/btrprog)** · 11 min read · 36 upvotes · 2 comments

## Summary

5 Sorting Algorithms Every Programmer Should Know. Insertion, selection, bubble, merge, and quick sort. A sorting algorithm is used to rearrange a given array or list of elements as per the comparison operator on the element. For a complete Data Structures and Algorithm cheatsheet, fork this GitHub repo.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/better-programming/5-basic-sorting-algorithms-you-must-know-9ef5b1f3949c>

## Community discussion

Top comments from developers on daily.dev.

**@malek\_smida** · 2 upvotes

> 1- Insertion Sort
> 2- Selection Sort
> 3- Bubble Sort
> 4- Merge Sort
> 5- Quick Sort

**@ghost** · 0 upvotes

> Great! They added nice diagrams which are really helpful. 💯

---

Tags: [#data-science](https://daily.dev/tags/data-science), [#general-programming](https://daily.dev/tags/general-programming)

[View this post on daily.dev](https://daily.dev/posts/5-sorting-algorithms-every-programmer-should-know-efpywamdv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"5 Sorting Algorithms Every Programmer Should Know","url":"https://daily.dev/posts/5-sorting-algorithms-every-programmer-should-know-efpywamdv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/5-sorting-algorithms-every-programmer-should-know-efpywamdv"},"datePublished":"2020-11-06T02:05:06.283Z","dateModified":"2026-03-15T03:50:50.801Z","description":"5 Sorting Algorithms Every Programmer Should Know. Insertion, selection, bubble, merge, and quick sort. A sorting algorithm is used to rearrange a given array...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ea0929bb890602b7080c172b2d4b4579","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ea0929bb890602b7080c172b2d4b4579","isAccessibleForFree":true,"articleSection":"Better Programming","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Better Programming","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/d957a1c828884dbb9543ba3e0beb6bc7","url":"https://daily.dev/sources/btrprog"},"commentCount":2,"discussionUrl":"https://daily.dev/posts/5-sorting-algorithms-every-programmer-should-know-efpywamdv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":36},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"data-science,general-programming","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Better Programming","item":"https://daily.dev/sources/btrprog"},{"@type":"ListItem","position":3,"name":"5 Sorting Algorithms Every Programmer Should Know"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/5-sorting-algorithms-every-programmer-should-know-efpywamdv","comment":[{"@type":"Comment","text":"1- Insertion Sort\n2- Selection Sort\n3- Bubble Sort\n4- Merge Sort\n5- Quick Sort","datePublished":"2020-11-06T13:05:27.354Z","url":"https://daily.dev/posts/EFPywAMDv#c-m1bc5he3I","author":{"@type":"Person","name":"malek smida","url":"https://daily.dev/malek_smida","image":"https://lh3.googleusercontent.com/a-/AOh14GjySZYCECYuuVA6J7zzrVs73Iawe5UC6jEcBSuMWQ=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"Great! They added nice diagrams which are really helpful. 💯","datePublished":"2020-11-06T14:11:26.841Z","url":"https://daily.dev/posts/EFPywAMDv#c-jDOk97Nut","author":{"@type":"Person","name":"Deleted user","url":"https://daily.dev/ghost","image":"https://media.daily.dev/image/upload/s--hNIUzLiO--/f_auto/v1705327420/public/ghost_vlftth"}}]}
```

