01 Jan 2015
Arquillian is a platform which provides integration tests by deploying, running containers so that we can easily use cdi beans in tests. In this tutorial we will see how to inject and use cdi beans in test classes by running Arquillian.
As a first step we have to add Arquillian core library in our pom.xml in the dependencyManagement
block. Well it is completely optional, and you can add it in dependencies
section.
29 Dec 2014
CDI (Context and Dependency Injection) is a specification defined in JSR299. Major aim is loose coupling by dependency injection.In this tutorial we will see how to use CDI Dependency Injection in java with three different ways;

Field injection

Constructor injection

Setter method injection
02 Sep 2014
Graphs are data structures to represent road networks, the web, social networks etc. Moreover, hundreds of computational problems are related to graphs.They have two main ingredient which are;

\(Vertices (V)\) as known as nodes.

\(Edges (E)\) : pair of vertices

can be undirected.

or directed.
16 Jul 2014
Quicksort is a sorting algorithm which applies divide and conquer paradigm. Quicksort has a worst case running time of \( O(n^{2}) \) , however, it has running time of \( O(n logn) \) on average which makes quicksort very efficient. Moreover, it works inplace but not stable. The performance of quicksort depends on selecting the pivot, and starting to partition around it. During the partition procedure subarrays divided into four regions; \( \leq x \), \( > x \), \( unrestricted \) ,and finally the \( pivot \).
06 Jul 2014
Selection sort is an inplace comparison sort algorithm which has \( O(n^2) \) running time complexity in both best and worst case. Even though its logic is similar to insertion sort, it's a very inefficient sorting algorithm. List is both divided into two parts as sorted and unsorted where initially sorted part is empty. Every turn, algorithm finds the minimum (or maximum) key in unsorted sublist then swaps it with the leftmost element of unsorted part. Due to the reason which elements in any place could get swapped selection sort is not stable.