Radix sort is a non-comparison based sorting algorithm that is similar to count sort. It has a linear time complexity and can be used to sort any type of data, including integers, strings, and floating-point numbers. Some of the key takeaways from the video: Radix sort is a non-comparison based sorting algorithm. Radix sort has a linear time complexity. Radix sort can be used to sort any type of…
Keep Reading →
Latest stories
Count sort is a sorting algorithm that works on a range bound inputs. It is a stable sorting algorithm, which means that it preserves the order of equal elements. The algorithm works by counting the number of times each element appears in the input array, and then using this information to place each element in its correct position in the output array. Here is an example of how to implement count…
Keep Reading →
Heap sort is an efficient sorting algorithm that belongs to the family of comparison sorts. It is based on the idea of maintaining a heap data structure, which is a tree-based data structure that satisfies the heap property: in a max heap, the value of each parent node is greater than or equal to the values of its children; in a min heap, the value of each parent node is less than or equal to the…
Keep Reading →
Quicksort is really a family of algorithms, there are so many different variations. The basic idea here is to find the sorted position of one element at time. What we want to do in each pass is that a chosen number is placed to a position such that, all the numbers ahead of it are smaller than it and all the numbers behind it are greater. First Approach One of the simplest approach (more commonly…
Keep Reading →
Recursive merge sort Works on the principle of divide and conquer.
You split the array in sub arrays, until you can't further divide.
Then a merge between two arrays is performed to produce a sorted array. Merge sort algorithm is a recursive algorithm.
The terminal condition is if there is only 1 elment in the array. Once you have left sub array and right subarray.
Create an empty array to hold…
Keep Reading →
Another O(n^2) sorting algorithm Insertion sort is another simple sorting algorithm. An analogy that can be used to remember how insertion sort works is. A person is given a task to arrange people in a queue in ascending order of their heights. This coordinator picks a person from (i)th position and tries to find their correct position.
A correct position is where person ahead in the queue is…
Keep Reading →
Learning software design patterns If ever in your life anyone asked you or used the terms mentioned above and if you felt uncomfortable the post is for you. If you have ever coded anything in JavaScript and if you understand what a callback is, then you will laugh at those people who mere use these terms and scared the shit out of you. Some of these guys will not even have courtesy to even let…
Keep Reading →
Right context setting is very important to understand this concept. Think in terms of what our end goal is, rather than specific language oriented solution. Most often while reading design patterns, we come across the guidance, that says program to an interface not to an implementation. At this time many of us may think that the language that I code in doesn't support interface, hence it's not for…
Keep Reading →
An analogy One of the easiest way to remember bubble sort is to think about what happens when you drop a heavy object in to glass of soda. There are bubbles while the heavy object goes and rests at the bottom. \ Bubble sort is one of the most simplest sorting algorithm where, you keep comparing the two consecutive items to one another and if they don't seem to be in their right place, i.e first…
Keep Reading →
Another O(n^2) sorting algorithm Selection sort is another simple sorting algorithm that works by growing a subset of either largest numbers or smallest numbers. As the name suggests the algorithm works by making selections. You pass over elements and keep a reference of largest one. Once you reach the end of unsorted portion of array, you swap the last element with the largest element seen. Now…
Keep Reading →
Adobe firefly AI generated image to represent micro frontend application It’s a new jargon and new lingo, we have been doing this from the time we have frames not just iFrames. I believe the jargon is heavily influenced with the concept of domain driven design which is not a new thing is you have been ever involved with the back-end development at scale. A piece of caution I would say Micro front…
Keep Reading →
Conding to an interface and not to an implementation GitHub: Source Example: Code to an interface not to an implementation About the example,
we have a base class of BaseAutomobile that’s applicable for every consumer
automobile in the world. Like Cars, Buses or Trucks. The implementation is extensible for multiple engines,
gearboxes, wheels setup and brakes. What an interface is? Head to my…
Keep Reading →
RESTful API As the full form goes Application Programming Interface, it suggests that we are trying to communicate with something. In order to do so we define certain contracts, which in simpler words is to define the rules of how you ask for something and how I will be responding back to you. One of the analogies is whenever we write a letter it should have a specific format for specific use…
Keep Reading →