Category: Algorithms

Binary Search Tree (BST)

A BST is a rooted binary tree, whose internal nodes each store a key, and each have two distinguished subtrees, commonly denoted left and right.

Read More

Binary search – locate target fast in O(logn)

Binary search is an efficient algorithm for finding an item from a sorted list of items. Here you will find several morphs with the source code.

Read More

Remove Duplicates from sorted LinkedList

Give a list of sorted numbers, delete all duplicates such that each element appear only once. Time complexity must be in O(n).

Read More

Bucket Sort, Bubble Sort, Selection Sort, and Quick Sort

Sorting is really important in software development. This article brings the four sort algorithms, which are Bucket Sort, Bubble sort, selection sort and quick sort.

Read More

Measure execution time for a method

The duration of running the method is the execution time [Figure below]. In Java, there are plenty of methods to measure the execution time.

Read More