Tag: algorithms

Total 34 Posts

Merge Sort in Python

Introduction

Merge Sort is one of the most famous sorting algorithms. If you're studying Computer Science, Merge Sort, alongside Quick Sort is likely the first efficient, general-purpose sorting algorithm you have heard of. It is also a classic example of a divide-and-conquer category of algorithms.

Merge Sort

The way Merge

Continue Reading

Stochastic Optimization: Random Search in Java

Introduction

Stochastic Optimization refers to a category of optimization algorithms that generate and utilize random points of data to find an approximate solution.

While brute-force algorithms do provide us with the best solution, they're terribly inefficient. This isn't an issue with smaller datasets, but most real-life problems and search-spaces require

Continue Reading

Sorting Arrays in JavaScript

Like many other popular languages, JavaScript conveniently comes with a built-in method for sorting arrays. While the end result is the same, the various JavaScript engines implement this method using different sort algorithms:

  • V8: Quicksort or Insertion Sort (for smaller arrays)
  • Firefox: Merge sort
  • Safari: Quicksort, Merge Sort, or Selection
Continue Reading

Insertion Sort in Java

Introduction

Sorting is a crucial aspect of digesting data. For us humans, it's much more natural to sort things that have something in common like the date of publishing, alphabetical order, articles belonging to an author, from smallest to largest, etc. This makes it a lot easier to comprehend the

Continue Reading

Merge Sort in Java

Introduction

Sorting is a crucial aspect of digesting data. For us humans, it's much more natural to sort things that have something in common like the date of publishing, alphabetical order, articles belonging to an author, from smallest to largest, etc. This makes it a lot easier to comprehend the

Continue Reading

Bubble Sort in Java

Introduction

Sorting is a crucial aspect of digesting data. For us humans, it's much more natural to sort things that have something in common like the date of publishing, alphabetical order, articles belonging to an author, from smallest to largest, etc...

This makes it a lot easier to comprehend the

Continue Reading