**Problem statement**

You are given an m x n matrix M initialized with all 0’s and an array of operations ops, where ops[i] = [ai, bi] means M[x][y] should be incremented by one for all 0 <= x < ai and 0 <= y < bi.

Count and return the…

**Problem statement**

You are given an m x n matrix M initialized with all 0’s and an array of operations ops, where ops[i] = [ai, bi] means M[x][y] should be incremented by one for all 0 <= x < ai and 0 <= y < bi.

Count and return the…

Write an efficient algorithm that searches for a target value in an m x n integer matrix. The matrix has the following properties:

- Integers in each row are sorted in ascending from
**left to right**. - Integers in each column are sorted in ascending from
**top to bottom**.

**Example:1**

Input: matrix…

Given the root of a Binary Search Tree and a target number k, return true if there exist two elements in the BST such that their sum is equal to the given target.

**Input:** root = [5,3,6,2,4,null,7], k = 9**Output:** true

This question is similar to finding if their…

This question was asked in Uber interview.

**Problem statement**

Given an array of integers, return a new array such that each element at index `i`

of the new array is the product of all the numbers in the original array except the one at `i.`

For example, if our input…

Writing an efficient code means writing memory-efficient code.

This article describes memory management and garbage collection in python 3.6.

It is very important for any software developer to understand how memory allocation happens and how that memory is managed.

In this we will go through :

- What is memory management?
- …

In this post , we will follow through below steps assuming that you already have a git repo which you want to clone in your EC2 instance.

Also assuming that , you have already provisioned EC2 instance in AWS.

- connecting to EC2 instance
- Generating SSH keys on EC2 instance
- Adding…

**What is Two Way Data Binding?**

Any model changes are automatically in the view and any changes to the model like text box , radio button selection , check box selection are also updated to the model.

**How to achieve Two way data binding in Vue js?**

Similar to angular where in angular it provides **ng-model directive** to achieve two way data binding , in vue it provides a directive called **v-model with which we can achieve two way data binding.**

**Example:**

In this example , whenever you type something in text box , its value is automatically updated in the view.

In this post , we will be discussing about Retry decorator and how to use it in python.

Generally , we might have encountered many scenarios where we want to execute a piece of code until we get expected result or we may need to wait for the some operation…

16-August-2021

Given an integer array nums, handle multiple queries of the following type:

Calculate the sum of the elements of nums between indices left and right inclusive where left <= right.

Implement the NumArray class:

NumArray(int[] nums) Initializes the object with the integer array nums.

int sumRange(int left, int right)…

In this post , we will learn about how we can show loader in Angular application using Ngx spinner library

Ngx-spinner is an angular library for loading spinner which supports Angular4+.

Follow below steps:

**Step1:**

Install ngx-spinner library using below command.

`npm install ngx-spinner --save`

**Step2:**

Update **app.module.ts **by importing…