Kahn’s Algorithm for Topological Sort


BFS + Queue

We will have a Adjacency List, on array which consists of degree of each vertex and a Queue

Let’s see for traverse this algorithm for the graph given below.


Step 1: Find incoming degree for each vertex and store it in the array


Step 2: Push all the nodes with incoming degree zero in the Queue. As the nodes with incoming degree zero becomes the starting point of the topological Sort (in the previous blog)


Step 3: Process the queue and we will take a count variable which will keep track of how many vertices have been processed

Topological Sort

Topological sorting for any graph is possible if it is a DAG

Directed Acyclic Graph (DAG)

A directed graph with no cycle is called DAG


Topological Sort is the linear ordering of the vertices such that for every directed edge UV(U->V) vertex U comes before V in the ordering.


Let’s look at this graph and find the topological sort for this:

Step 1: First find the vertex with 0 degree means no incoming edge


So we can start with vertex 4 or 5 .So let’s start with vertex 5

Result= [5]

Since we have one more vertex with degree 0 i.e. 4 we add it in the result list


Step 2: Now eliminate 5 and 4 with their edges and again calculate the degree of each vertex.

Google Website Optimizer : For Testing and Personalization

Your Website Is Your Store Window.

So let me introduce you all to this amazing tool that will let you create personalised experiences for your valuable customers and engage your website visitors like never before.



Google Website Optimizer is a fabulous website optimisation tool that is freely available to all. It helps online marketers increase visitors of their websites and also the conversion rates. But most important of all it helps in increasing overall visitor satisfaction by testing different combinations of website content. It could test any element that existed as HTML code on a page including calls to action (CTAs), fonts, buttons, headlines, product images, reviews, and forms. Webmasters test different versions of an entire page. This is called A/B testing (or A/B split testing). They can also test multiple combinations of page elements such as buttons, CTA, headings, images, or body elements . This is known as Multivariate testing. 


      "Google Optimize helped us make continuous UX improvements on our mobile site. One experiment alone drove a 2X increase in monthly plan sales."

- Simen Petersen, Digital Business Developer & Project Lead, Telia

How optimise can help our website ?  

Now since we know about this amazing tool, let us deep dive into all its perks so that we can make the best use of it. Google Optimize guides us which site experiences engage and delight our customers the most . It also gives us the solutions we need to deliver them. So, Personalize your site and enjoy the rewards .


Introduction to ASP.NET Core



ASP.NET Core is the new version of the ASP.NET web framework mainly targeted to run on .NET Core platform. 

ASP.NET Core is a free, open-source, and cross-platform framework for building cloud-based applications, web apps, IoT apps, and mobile backends. It is designed to run on the cloud as well as on-premises. 

ASP.NET 3.x runs only on .NET Core 3.x, whereas ASP.NET Core 2.x runs on .NET Core 2.x as well as .NET Framework.



RPA using UI Path

What is RPA?

Robotic Process Automation (RPA) is the technology that allows to automate any task which humans do it manually. In other words, we can say RPA is a software program which copies the human action while interacting with the computer applications and automates the repetitive and rule based processes.

Why RPA?

RPA can be helpful to fill the gap between systems and process. RPA helps to ensure that tasks is completed more quickly as the tool can retrieve the data from the background. Tool can do repetitive work more quickly, accurately, and tirelessly than humans.

RPA helps in fast release, less time consumption, less cost consumption and quality is also assured with the correctness.

Also many enterprises are adopting digital methods for their operation because they understood that future lies in routine operation being fully automated. Speed of execution and accuracy are the two biggest advantages of digitization.

Pros & Cons of RPA


  • Improves productivity by saving time and cost.
  • Reduces human intervention thus reduces human errors.
  • Provides real time visibility for bugs discovery.
  • Can be used by non-technical person also as minimum level of programming skills are required to use.
  • It is easy to automate lengthy and repetitive process.
  • Needs less training to start working on RPA tool.


  • For small changes also in an application, robots need to be reconfigured.
  • Dependency of bots the speed of applications.


Tools for RPA:

Blue Prism

It is a RPA software that provides an agile digital workforce to the organizations. It can be downloaded from 


Automation Anywhere 

Concurrency in Transaction


Concurrency means allowing more than one transaction to operate simultaneously on a same database.

Concurrency has many advantages

1. Reduces waiting time

2. Reduces the Response time.

3. Increases resource utilization

4. Increases Efficiency.




                                                   Image for post

If t2 reads a value of A from T1 and commits the value and afterwards T1 due to some circumstances rollbacks or change the value of A. Now T2 has committed the value that doesn’t exists in the system. This problem is known as dirty read Problem.



An Introduction to Dart

What is Dart?

“Dart is a client-optimized programming language for apps on multiple platforms. It is developed by google and is used to build mobile, desktop, server, and web applications”

That is the definition of Dart available on Wikipedia. But what does that mean. It means that finally we have a language for the backend developers to learn for them to become full-stack developers. Dart is a Strongly typed, Object Oriented language (and not in object oriented like JavaScript, it is object oriented more like Java).


Why Dart?

Clone a linked list with next and random pointer with O(1) space complexity.

We have a double linked list where each node consists of three pointers data, random and next. Now our task is to clone this linked list


                                     Image for post

Now let’s look into another solution of this problem.

  1. Create a copy of node 1 and placed it in between 1 and 2, copy of node 2 and place in between 2 and 3 and so on till the nth node.


Image for post

2.Now we will perform this

original->next->random= original->random->next;

let’s see how it works

1st Node


Clone a linked list with next and random pointer


We have a double linked list where each node consists of three pointers data, random and next. Now our task is to clone this linked list


Let’s first dive deep into the 1st solution of this problem

This method stores the next and random pointer (of original list) in an array first, then modifies the original Linked List (to create copy), creates a copy. And finally restores the original list.

     1. First we will make a simple copy of the above linked list in which next is pointing to the next node and random is currently pointing to null.   


      2.   The next pointer of the original linked list will point to the node of the copied linked list                                                                                                                   


       3. For all random pointers in the copied linked list give address of respective nodes in the original linked list.



        4. Next we will perform the following statement

Optimizing single page and web applications performance

With the browsers becoming more and more advanced and supporting multiple new technologies now and web apps supporting rich content, it has become more important to focus on performance of web applications. These include both Single Page Applications(aka SPAs) and traditional server side rendered web applications.

In this article we will look at some steps that can be taken to improve the performance of web applications.

Remove duplicate JavaScript and CSS

Loading duplicate JS and CSS files has multiple drawbacks. For one the increased number of network requests which will make your site slower. Secondly, in case of some scripts, these scripts can collide and cause unexpected behavior. And finally Google can punish the website in search results.


Hence always ensure that all the JS and CSS files that you are loading are not duplicated.