Java

Java Tutorials – If-Else Switch and Loops in Java

Posted on

Hello people…! This is a new post in Java Tutorials – If-Else Switch and Loops in Java. In this post, I will talk about branching and looping in Java, i.e. , about the if-else, switch and loop constructs. With this you can write plenty of programs in Java which you wrote to  practice C language. […]

Java

Data Types, Input and Operators in Java

Posted on

Hello people…! This is a new post in Java Tutorials – Data Types, Input and Operators in Java. In my previous post, Java Tutorials – An Introduction, I introduced you to the Java programming language. We didn’t do anything more than printing text on the terminal. Now, we will learn to write short programs which […]

Java

Java Tutorials – An Introduction

Posted on

Hello people…! This is the first post in Java Tutorials – An Introduction. This, is a whole new section of Theory of Programming, where we talk about one of the most widely used languages in industry, Java. I have quite a lot of experience programming in Java and developing small applications. So, I am combining […]

Graph Theory

Prim’s Algorithm

Posted on

Hello people…! In this post, I will talk about the Prim’s Algorithm for finding a Minimum Spanning Tree for a given weighted graph. It is an excellent example of a Greedy Algorithm. It is very similar to Dijkstra’s Algorithm for finding the shortest path from a given source. This is my first post regarding the […]

Sorting Algorithms

Merge Sort Algorithm

Posted on

Hello people…! In this post I will talk about another sorting algorithm, the Merge Sort Algorithm, which is considered to be the fastest sorting technique by many. Merge Sort was invented by a famous computer scientist John von Neumann. It is a stable sort, so the relative position of the elements are preserved. It uses […]

Tree Data Structures

Segment Trees

Posted on

Hello people…! In this post I will talk about one of the most versatile data structure in competitive programming, the Segment Tree. Almost in every contest that you do in the major coding websites, at least one question is asked which uses a Segment Tree in its solution. This is because it is easy to […]

Sorting Algorithms

Quick Sort Algorithm

Posted on

Hello people…! In this post I will talk about the Quick Sort Algorithm. This is an in-place sorting algorithm, which means it works on the given array itself and does not need any additional space, which means less overheads. But this is an unstable sorting algorithm, which means that the relative position of equal elements […]

Graph Theory

Bellman Ford Algorithm

Posted on

Hello people…! In this post I will talk about another single source shortest path algorithm, the Bellman Ford Algorithm. Unlike Dijkstra’s Algorithm, which works only for a graph positive edge weights, the Bellman Ford Algorithm will give the shortest path from a given vertex for a graph with negative edge weights also. Due to this, […]