Tag Archives: implementation

[C++] List sorting – bucket sort and others

In this article I will show you pure implementation of algorithms, which can be used to sort lists + list implementation. Bucket sort, quicker sort and insertion sort. Check also previous articles on the same topic: – C++ radix sort … Continue reading

Leave a comment

[C++] Convex hull – Graham algorithm

In this article I will concentrate on Graham algorithm – method of computing convex hull. The complexity of this algorithm is equal to O(nlogn). Assuming that you already know the Graham algorithm, let’s move to the implementation ;) 1. Declare … Continue reading

2 Comments

[C++] Radix sort – integers sorting

I have recently written article about counting sort, a linear complexity stable sorting algorithm: C++ counting sort implementation. Now I want to introduce you another fast sorting algorithm – radix sort. It is divided into two parts: one part that … Continue reading

2 Comments

[C++] Counting sort: faster than quicksort!

Probably you know sorting at good level, wrote quicksort and other fast algorithms thousand times. The best sorting algorithms which as main operation have comparing one value to another has O(nlogn) complexity. With the assumption of comparing values they couldn’t … Continue reading

Leave a comment

[Java] The fastest singleton

Everybody know how to write thread-safe singleton. Consider standard approach: The example above could be slow – consider synchronization cost every time you getting singleton instance. Can you do it faster? Of course: The synchronization cost is much lower – … Continue reading

5 Comments