Category: Blog

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

Java Collections & Java Arrays Methods

Java offers two types of constructs where you can store multiple values or objects of the same type: Arrays and Collections. This article has the diagram of the main functions.

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

Multiply Strings – Leetcode Medium

Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.

Read More

Java Reflection makes it possible to inspect

Reflection is an API which is used to examine or modify the behavior of methods, classes, interfaces at runtime. A class has multiple component…

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