Aditya Chatterjee's Blog, page 185

December 11, 2020

Building a chrome extension step by step

In this guide, we have illustrated how to build a simple chrome extension step by step and how to load our chrome extension using Developer tools and check it.

Building a chrome extension

Capture3-1

What are chrome extensions?

Chrome extensions can be considered as small programs which add functionality to your chrome browser.

They can help you achieve a variety of tasks, right from manipulating the DOM of your webpage, modifiying the content as per your choice, or providing some tools like screen...

 •  0 comments  •  flag
Share on Twitter
Published on December 11, 2020 09:58

mmap, brk and sbrk memory management calls in UNIX

In this article we will learn more Advanced Memory Allocation in Unix.

Let's begin with an interesting question then !! Question An example for memory management system call in unix is: fork sigaction mmap execve

It's great if you got the the answer.

It's great even if you didn't get it! Because you are continuing to read and you are ready to explore and find the right answer :)

Happy learning!!

brk and sbrk are basic memory management system calls used in Unix and Unix-like operating...
 •  0 comments  •  flag
Share on Twitter
Published on December 11, 2020 07:58

December 10, 2020

The Idea of Indexing in NLP for Information Retrieval

The Idea of Indexing in NLP for Information Retrieval

Did you ever wondered how an Information Retrieval occur when you search for a query on Google or any other search engine?

Information Retrieval can be defined as finding material of an unstructured nature that satisfies the information need from within large collections.

In the 90's, the searching for an information on the Internet is less memory consuming because at that time there is less document available online and that is in structured manner on the Internet, but as the Internet usage...

 •  0 comments  •  flag
Share on Twitter
Published on December 10, 2020 12:46

nullptr (null pointer) in C++

A null pointer (nullptr) is a pointer that does not point to any memory location. nullptr is a keyword that was introduced in C++11 standard to denote a null pointer. This standard also introduced a nullptr_t type. The rest of this article dives into the reasons for introduction of the new keyword, looks further into nullptr, and provides some examples and a use-case.

Before C++11

Many of the features that C++ has, have been taken from C. In C a null pointer is defined as (void *)0. Which is...

 •  0 comments  •  flag
Share on Twitter
Published on December 10, 2020 12:40

December 8, 2020

Applications of Random Forest

The random forest algorithm is also known as the random forest classifier in machine learning. It is a very prominent algorithm for classification. One of the most prominent fact about this algorithm is that it can be used as both classification and random forest regression algorithm.

Why Should We Use Random Forest

Some of its advantages and important features why we use the Random forest Algorithm in machine learning.

Random forest algorithm is suitable for both classifications and...
 •  0 comments  •  flag
Share on Twitter
Published on December 08, 2020 14:28

Find number of solutions of a linear equation of N variables

We have to find the number of solutions to a linear equation of N variables. We have solved this using Dynamic Programming.

For the sake of simplicity, let us assume that we have to find the non-negative integral solutions for the equation, and all the coefficients on the equation are positive integers.

As an example, let us consider the linear equation 3x1 + x2 = 9. Note that this is a linear equation of 2 variables. So, here, n = 2. The non-negative integral solutions for this equation in...

 •  0 comments  •  flag
Share on Twitter
Published on December 08, 2020 13:28

Diameter of N-ary tree using Dynamic Programming

In this problem, we are given input as the reference to the root of an N-ary tree.
We need to calculate the diameter of the tree that is the longest path between any two nodes using Dynamic Programming.

A tree is an extensively used data structure in the world of programming. Every node in a tree can have more further subdivisions. The bottom-most nodes of a tree that have no sub-divisions, are called the leaf nodes.

We know that in a binary tree, each node has no more than 2 children....

 •  0 comments  •  flag
Share on Twitter
Published on December 08, 2020 13:23

Finding Diameter of Tree using Height of each Node

In this article we have explored the algorithm on how to find the diameter of the tree using height of each node. This will take linear time O(V+E) time complexity.

What is Diameter of a tree ?

Diameter of tree is defined as the no. of nodes in the longest path between leaf nodes nodes of a tree ( undirected graph ) , it is also called the width of the tree.

How to find diameter of the tree ?

Well , there are two more methods apart from the methods mentioned in this article to find the...

 •  0 comments  •  flag
Share on Twitter
Published on December 08, 2020 13:12

Design Graph using OOP concepts in Java

In this Blog, you are going to learn to design and implement the graph data structure using OOP (Object Oriented Programming) Concepts. We will implement in Java but the ideas are applicable in any language.

First You need to understand What is Graph Data Structure all about? Learn from here

The main components of graph are:

Vertex/Nodes Edges

graph-1

So, how can we initialize these components using Object-Oriented Concepts ?

Let's talk about nodes(vertex),
We need to have multiple nodes in graph...

 •  0 comments  •  flag
Share on Twitter
Published on December 08, 2020 13:03

Different ways to initialize 2D array in C++

Arrays are the derived type in C++ that can hold values of same data type in contiguous memory allocation. In an array of size n, each value has an index number, starting from 0 till n-1.

We have explored different types to initialize 2D array in C++ like:

Sized array initialization Skipping values initialization Unsized array initialization Types

Arrays are of two types:

1.One-Dimensional Arrays
2.Multi-Dimensional Arrays

Two-Dimensional (2-D) Arrays

Multi-Dimensional Arrays comprise of...

 •  0 comments  •  flag
Share on Twitter
Published on December 08, 2020 12:53