Data Structure

A Data Structure is a storage that is used to store and organized data.

Best Time to Buy and Sell Stock

In this tutorial we will learn how to deduct Best Time to Buy And Sell Stock To Get maximum profit. Below are some examples. This problem can be solved by various approaches. Problem? Given an array of N length, representing the process of the stocks on different days. The task is to find the maximum …

Best Time to Buy and Sell Stock Read More »

Factorial of a Number

Factorial for a non-negative integer or number is the multiplication of all positive integers less than or equal to the value. For example factorial for a 5 is 5x4x3x2x1 = 120. This is a part of Data Structure. The above calculation is achieve by the formula of ‘n!’ which can be represent as below. This …

Factorial of a Number Read More »

Spiral Matrix With Examples

In this tutorial we will learn how to Spiral A Matrix with examples. In other words Spirally Traverse of a Matrix using best approach of algorithm. This is a part of Data Structure. How To Spiral A Matrix? We have a input Matrix as shown above. It could have any length. Now we have to …

Spiral Matrix With Examples Read More »

Sorting An Array In JavaScript

In this tutorial we will learn , How to sort different types of array in JavaScript. Generally sorting needed in table’s column. On clicking the column name it sorted by ascending or descending order. We will sort a string array, integer array and objective array with examples. How to sort an array in JavaScript? 1. …

Sorting An Array In JavaScript Read More »

Scroll to Top