Aditya Chatterjee's Blog, page 192

October 12, 2020

Minimum number of operations to make XOR of array equal to zero

You are given an array of n non-negative integers. Your task is to find the minimum number of operations to make XOR of array equal to zero by performing the operations which are defined as follows:



Select the element on which you will perform the operations. Note that all the operations must be performed only on the selected element.
The operation that can be performed are increment and decrement by one.

Examples
Input:
No. of elements in array = 3
Elements = 2 4 7
Output:
1

Expl...
 •  0 comments  •  flag
Share on Twitter
Published on October 12, 2020 01:49

October 11, 2020

Application of BERT : Sentence semantic similarity

Application of BERT : Sentence semantic similarity

In this article, I will be going to introduce you with the another application of BERT for finding out whether a particular pair of sentences have the similar meaning or not .The same concept can also be used to compare two sentences in different form instead of only for the similar meaning these task might be follow up or proceeding sentences or whether two sentences belong to the same related topic or not etc.


Sentence Semantic similarity

In general Natural Language Processing tasks we need to...

 •  0 comments  •  flag
Share on Twitter
Published on October 11, 2020 08:14

Application of BERT : Binary Text Classification

Application of BERT : Binary Text Classification

This article focused on implementation of one of the most widely used NLP Task " Text classification " using BERT Language model and Pytorch framework.


Overview of applications of BERT

As we discussed in our previous articles, BERT can be used for a variety of NLP tasks such as Text Classification or Sentence Classification , Semantic Similarity between pairs of Sentences , Question Answering Task with paragraph , Text summarization etc.. but, there are some NLP task where BERT cant used due to ...

 •  0 comments  •  flag
Share on Twitter
Published on October 11, 2020 08:02

Push Relabel Algorithm

Push relabel algorithm is also known as Preflow Push algorithm. It is used for computing maximum flows in a flow network.


Maximum flow in a network graph

In a network graph where every edge has a given capacity, maximum flow is defined as the maximum amount of flow that can move from source to sink. Maximum flow is calculated keeping in mind two constraints,



For every vertex (except source and sink), incoming flow is equal to outgoing flow.
Flow of an edge shouldn't exceed its capacity.

Concep...
 •  0 comments  •  flag
Share on Twitter
Published on October 11, 2020 07:32

October 9, 2020

Hosting websites using GitHub

github-logo


Github is an online Git Repository hosting service you can use, to host your projects, share your code, contribute to various open source projects and also collaborate with others on a project.


Another awesome feature about GitHub is, you can use it to host your static websites. So, In this tutorial, you will learn how to host fast, secure and reliable static websites (developed using HTML, CSS and JavaScript) on Github for FREE!.


Note: This is a beginner-friendly tutorial. No prior experience ...

 •  0 comments  •  flag
Share on Twitter
Published on October 09, 2020 18:41

Move Semantics in C++

Move semantics might sound like a scary term, but it's relatively easy to understand. This post will explain some of the basic concepts of move semantics, and how important they can be!


References

Before we begin with move semantics, let's do a quick refresher on references. Consider the code below:


int main() {
std::vector vect;
function1(vect);
function2(vect);
}

void function1(std::vector v) {
/*
* This is passing an argument by value
* Modification of "v" here won'...
 •  0 comments  •  flag
Share on Twitter
Published on October 09, 2020 17:58

Travelling Salesman Problem using Branch and Bound approach

In this article we will briefly discuss about the travelling salesman problem and the branch and bound method to solve the same.


What is the problem statement ?

Travelling Salesman Problem is based on a real life scenario, where a salesman from a company has to start from his own city and visit all the assigned cities exactly once and return to his home till the end of the day. The exact problem statement goes like this,

"Given a set of cities and distance between every pair of cities, the probl...

 •  0 comments  •  flag
Share on Twitter
Published on October 09, 2020 15:35

tag in HTML

<html> tag in HTML

in HTML is the parent tag, that contains each and every element tags of the HTML document inside of it, except for the tag. It is also known as the root element. You can only use one pair of opening and closing tags.



Categories: None.
Contexts in which this element can be used: As the document's document element.

Wherever a subdocument framework is allowed in a compound document.
Content model: A element followed by a element.
Tag omission in text/html: The start tag can be omited, if the ...
 •  0 comments  •  flag
Share on Twitter
Published on October 09, 2020 08:29

Tough Interview questions on C Programming

These are some of the most tough Interview questions on C Programming which tests your knowledge on how well you know the language. Even if you are not a master of C, you must try it once and get your personal score to check how good you are in C.


Bookmark this page

 •  0 comments  •  flag
Share on Twitter
Published on October 09, 2020 08:19

October 8, 2020

Classification of CPU Scheduling Algorithms

Phase when CPU becomes idle and to have efficient use of available resources (processing power, hardware etc) in a given time constraint, it is the job of the CPU Scheduler to select another process from the ready queue to run next. CPU Scheduling algorithms are used. This raises the question in mind what is meant by CPU Scheduling algorithms?


CPU Scheduling Algorithm is a set of rules through which CPU executes given number of processes by utilizing the available resources efficiently and withi...

 •  0 comments  •  flag
Share on Twitter
Published on October 08, 2020 00:35