Hi I’m Lahiru Abegunawardena. This is my 4th article on “Sorting Algorithms” topic. You can find previous articles on Sorting algorithms and much more interesting topics here. Today we’ll discuss about Quick sort algorithm.

Quick sort is a sorting algorithm which follows divide and conquer method. First of all we need to understand what is this divide and conquer method.

Divide and conquer method

Think about some problem or a task which has a huge scope, thinking of solving this at onetime is hard and even can’t give the optimum solution. …

Hi I’m Lahiru Abegunawardena. This is my 3rd article on “Sorting Algorithms” topic. You can learn about Bubble Sort and Selection sort by referring 1st and 2nd articles of this series.

Insertion sort

Today we are going to discuss about insertion sorting and how we can implement this using java. First of all we need to know that Insertion sort also follows comparison based sorting algorithm.

How does this work?

In here we divide array of elements to be sorted into two sub-lists.

  1. sorted: elements that are sorted (0th to selected index)
  2. unsorted

In this article I’m building this algorithm to sort…

Hi I’m Lahiru Abegunawardena. This is my 2nd article on “Sorting Algorithms” topic. In 1st article of this series I described about Bubble Sorting algorithm and its implementation.

Selection Sort

Today we will discuss about selection sort algorithm. Selection sort is also follows comparison sorting algorithm. Let’s get a general idea about steps in this sorting.

In this steps you will understand that there are two parts within the list as unsorted and sorted. So basically you have to identify the smallest item in unsorted list and put it into sorted list until there are no items left in unsorted list.


Hi I’m Lahiru Abegunawardena. This is my new article series on Sorting Algorithms. First we will see what is an Algorithm.


Simply an algorithm is a sequence of instructions to solve a problem or perform a computation. This can be written as pseudocode, line by line instructions, even you can use flowchart diagram.

Sorting Algorithm

A Sorting Algorithm is used to rearrange a given array or list of elements according to a certain order. In this article series we will discuss about sorting a list of numbers according to ascending or descending order. …

Hi I’m lahiru Abegunawardena. This is the 3rd article on Java Springboot. In my 1st and 2nd articles on this series we discussed about storing data into mysql and retrieve all data from that table.

First of all I need to tell you that I changed responses from Store and getAll endpoints and added tryCatch blocks to prevent application from breaking when a exception occured. Following changes are applied in BookService class.

public Object storeBooks(BookModel newBook){
Map<String, Object> responseData = new HashMap<>();
try {
BookModel newBookDta =…

Hi I’m lahiru Abegunawardena. This is the 2nd article on Java Springboot. If you did everything right as given in 1st article you should have a rest api that returns Hello world in http://localhost:8080/ by now. I have created a github repo for this project and this repo will be updated. You can check it and continue with this tutorial.

So today I’ll continue from the last point we finished. Today we will discuss about creating api to store data into database and retrieve all data from it. You will find springboot gives all of this in very easy progress…

Hi I’m lahiru Abegunawardena and this a new series of articles I start on Springboot. I hope you will find this articles helpful. So let’s begin.

What is Springboot?

As you already know when we develop a web application we can use a RESTful web services for managing our database and do required CRUD operation. This type of web services can use sucessfully with frameworks such as Angular and libraries such as React. All you need to do is run them with different ports in a server and call to service using api end-points and perform correct CRUD operation.

So Spring boot is…

Hi I’m Lahiru Abegunawardena. This is the beginning of a new article series on MEANSTACK web development. At the end of this we will create a web application with Angular frontend, node backend and MongoDB database.

You will be wondering about what does it mean by MEANSTACK development.

M — Mongo

E — ExpressJS

A — Angular

N — Node

This is the list of main programming environment we use in MEANStack web development. So that’s how we get this name “MEANStack” web development.

If you are creating a web application using this technologies you need to start building backend…

Hi I’m Lahiru Abegunawardena. From this blog I would like to talk about MVC architecture.

As you already know we use programming languages to solve our problems using computers. Programming architecture is a something that helps you to keep your code neat and understandable. Mostly the requirement of using a coding architecture is applicable to any system you design with a database or a one with large set of components. If you clearly works on some architecture that would be an extra advantage to your maintenance periods too. …

Lahiru Sampath Abegunawardena

Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store