I am a software Engineer. I have worked with companies like Digismart, ARI Networks, SVG Media, and I am sure, 99% of you might not have heard about these companies. Whenever I tell my friends and relatives about my company, I have to repeat it 2 or 3 times to…

A[i] in array is implemented as *(A+i) , For example if you have an array of integers and each integer takes 4 bytes.
Lets say starting memory address is 100 then memory locations for each element would be


But If Array index starts with 1 then A[i] will be…

What is Continuous Delivery?

Continuous delivery (CD) is an approach in which teams produce software in short cycles, ensuring that the software can be reliably released in small intervals of time safely and quickly in a sustainable way. It aims at building, testing, and releasing software with greater speed and frequency. …

An empty tree is height balanced. A non empty binary tree T is balanced if

  1. Left subtree of T is balanced
  2. Right subtree of T is balanced
  3. The difference between heights of left subtree and right subtree is not more than one. This above height balancing scheme is used in AVL trees.
  4. Get height of right and left tree. return true if difference between height is not more than one.
class BinaryTree{
Node root;
boolean isBalanced(Node node){
int lh;
int rh;
if(node == null)
return true;
lh = heigh(node.left);
rh = height(node.right);
if(Math.abs(lh -rh)<= 1 && isBalanced(node.left) && isBalanced(node.right))
return true;
return false;
int height(Node node){
if(node == null)
return 0;
return 1+Math.max(height(node.left), height(node.right)); }}

Time complexity. O(n²) worst case, occurs in case of skewed trees.

So basically we have two methods by which we can implement queue using stacks.

  1. By Making Enqueue operation costly
  2. By Making Dequeue operation costly

Let’s see which one we should choose.

Method 1: By making enqueue operation costly. This method makes the oldest element always at the top of stack…

I have taken a course on udemy for microservices architecture and I am going to describe the case study given over there. We will go through the main steps of architecture process:

  1. Functional Requirements
  2. Non Functional Requirements
  3. Mapping the components
  4. Define communication pattern

We are going to discuss Library Management…

My assumptions are you have basic knowledge of JavaScript.

Getting Started

To get started create a new folder and call it hello_world.

$ mkdir myapp
$ cd myapp
//if windows users they can directly create the folder, and after getting inside the folder they can open the command prompt from there, which will get…

Navneet Ojha

I am Indian by birth, Punjabi by destiny. Humanity is my religion. Love to eat, travel, read books and my million dreams keep me alive.

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