Problem statement

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.


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.

Example 1:

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…

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.


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

Two way data binding in Vue js


Range Sum Query — Immutable

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:


Install ngx-spinner library using below command.

npm install ngx-spinner --save


Update app.module.ts by importing…

Dheeraj Thodupunuri

Full stack developer

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