Binary Search

Binary search is an algorithm to find the position of a target value within a sorted array by recursively halving the number of candidates. Assuming we have a sorted array with n elements, we can binary search a target element in logarithmic time, O(log(n)).  Binary Search Algorithm To perform a Read more…

Java Type erasure

Java type erasure You can work with java generics, but still, don’t understand type erasure? Let’s look at this example: The generic T is to perform type check at compile-time. To implement this generic, the compiler will: replace the T parameter with the bound classes or Object insert type casts to Read more…

Linux Server Admin

Here is a set of Linux commands used when operating as remote server admin: i.e. find and modify multiple files, sync local and remote files, generate keys, etc. SSH and keygen The first operation for working on a remote server is connecting via ssh. Typically, you connect to the server Read more…

Spring Web App Banking Example

This article shows how to quickly build a web application using the Spring Tools Suite. For this tutorial, I use Spring Tools 4 for Eclipse, where I initialize projects using Eclipse wizards. Spring Boot Web Application Spring has a lot of components, and SpringBoot is a convention over configuration approach Read more…