Top 6 the most important sorting algorithms in the world

Ho-ho-ho! Today we are going to take a look at THE MOST IMPORTANT SORTING ALGORITHMS IN THE WORLD!!!!1 You know, it is really hard to underestimate sorting algorithms. They are that much important as the sorting hat in Hogwarts! So, we will start from the famous BogoSort! 1. Bogosort The algorithm consists of two steps: Shuffle the array Check if this permutation is sorted So, I always imagine that this algorithm like a clown who put all the permutations in the box....

April 1, 2022 · 5 min · 889 words · Me

Adventures of Union Find

Hello folks 👋 Glad to see you reading this article again! Today we’re gonna talk about problems in graphs. Let’s take a look at the problem below. Imagine we have an edge-weighted undirected graph consisting of a few nodes. Our target is to find a minimum spanning tree in this graph. Minimum spanning tree is an undirected subgraph that contains all the vertices without cycles and with a minimum edges weight....

March 22, 2022 · 6 min · 1103 words · Me

Segment Tree and The Chamber of Secrets

Hello folks 👋 Another week has come and passed. It means that it is time for another article, yay! Do you remember the article about Fenwick tree? If don’t then, please, revisit it before starting with this one. During that article I mentioned an interesting data structure called Segment Tree. Unfortunately, I did not share any details about it. Note: also, there is another interesting data structure that can help us to achieve t_he same result....

March 15, 2022 · 5 min · 885 words · Me

Let's make pattern matching great again: Rabin-Karp algorithm

Hey folks 👋 I know it has been a long time since we’ve published the last article. We are really sorry for this delay! Let us do not beat around the bush and jump straight to the discussion topic: pattern matching. Have you ever caught yourself wondering, “I have some text and I want to find a string in it. How can I do it?” Luckily, I have an answer for this question....

March 8, 2022 · 10 min · 2130 words · Me

Thirty seconds over Ternary Search tree

Wow! It’s been another week from the time when I wrote the previous article about grokking algorithms. The time is passing so fast I barely can see it! Today I want to introduce a new concept to you - Ternary Search Tree (aka TST). You may already have heard about Binary Search Tree (aka BST) and this idea is pretty similar. Don’t worry if you did not hear about BST or any trees at all before, TST is pretty easy to understand and you will quickly nail it!...

February 2, 2022 · 6 min · 1091 words · Me