Home Tags Posts tagged with "Sorting"
Tag:

# Sorting

• Arrays

## [Leetcode] – Search Insert Position Solution

Binary Search is a fabulous concept that can be used to narrow down the search range. One such problem on LeetCode explores this domain where you need to find the correct position to insert the element in a sorted array

• Arrays

## [Leetcode] – Numbers Smaller than current

Small problems like these often become a part of larger complex problems. You are given an array and for each integer you need to find out the number of smaller numbers than itself. One technique is to compare each element with every other element. Another efficient approach would be to use the counting sort approach.

• Strings

## [Leetcode] – Group Anagrams Solution

Given an array of strings, group all the anagrams together. This post explores 2 methods to solve this problem. You can create groups by sorting, or by categorizing using the frequency of characters.

• Arrays

## [Leetcode] – Search in a Rotated Sorted Array Solution

You are given an array that is sorted but also rotated by an unknown number of times. Given a target value, return the index if it can be found. In this post we discuss the solution to this problem using a modified version of the binary search technique.

• Theory

Radix Sort is an unconventional sorting technique that does not work based on comparison. It works best when all the input elements of a list has the same number of characters.

• Arrays

## [Leetcode] – Two Sum Solution

Given an array, find the indices of 2 elements, that have a sum equal to the given target value.

• Theory

## Bucket Sort

Bucket Sort is a sorting technique which puts limitations on the input set to get an improved performance. But, before we start learning about this, let us take a quick recap. This is essential so that you understand what are the use cases of Bucket Sort. The sorting techniques that work in an average time complexity of are: Selection Sort Insertion Sort Bubble Sort Some sorting techniques that have an average time complexity of are: Merge Sort Quick Sort Counting Sort is a special sorting technique that does not work …