Aditya Chatterjee's Blog, page 51
February 23, 2023
4 ways to remove elements from Multiset in C++ STL
Multiset is a container in C++ STL (Standard Template Library) that stores elements in a specific order as per their value. It is similar to a set but allows duplicates. Multiset is implemented as a balanced binary search tree. Removing elements from a multiset is an important operation in many algorithms and applications. In this article, we will explore different ways to remove elements from a multiset in C++ STL including:
Using the multiset::erase() functionUsing the multiset::erase() func...February 22, 2023
Sliding Window Technique [Explained]
In this article, we will discuss about the sliding window technique and how it is useful while solving problems.
Table of Contents:
Introduction to Sliding WindowIdea of sliding windowExamples of sliding windowHow to identify sliding Window QuestionsQuestions set for sliding window patternIntroduction to Sliding WindowThe sliding window pattern is a common technique used to solve problems involving arrays or strings.As its name suggest, it takes subset of data from given arrays or string...
Generating IP Addresses [Backtracking String problem]
In this article, we will explore a common problem of restoring IP addresses from a given string of digits. For example, given the string "25525511135", the valid IP addresses that can be generated are "255.255.11.135" and "255.255.111.35". With step-by-step guide and helpful tips, you will be able to efficiently and accurately restore all possible IP addresses from the given string without any hassle.
Table of Contents̥BacktrackingApproachCodeAnalysisBacktrackingTo solve this problem we ...
Calculator console application in Python
We build a console calculator application using Python Programming Language in this article.
This application can perform basic arithmetic operations like addition, subtraction, multiplication and division.It can evaluate simple mathematical expressions like 8 + 9 - 6 ** 7 (** stands for power operation)The application can store the resultant value after a calculation. The user can use this value in further calculations by using the letter 'p' in its place.if the last calculated value was 5,...
Calculator with JavaScript
In this article, I will explain the steps on how I created a calculator with JavaScript with User Interface using HTML and CSS.
Table of contents:
Features/Requirements
Screenshot
HTML code
Styles with CSS
JavaScript:
Generate the buttonsON/OFF functionalitySet the numbersThe calculate functionalityThe main logicGet the final resultClear All/Clear Last functionality1. Features/Requirements:create a UI for the calculator
have ON/OFF functionality
perform basic calcul...
Delete an element in HTML DOM [3 ways]
HTML DOM (Document Object Model) is the structure of HTML elements that defines the way a web page is displayed on a browser. HTML DOM consists of various elements, such as headings, paragraphs, tables, and images, among others.When creating a website, it's common to use HTML elements to structure and style the content on a page. However, sometimes, it may be necessary to delete or remove an element from HTML DOM. Deleting an element from HTML DOM can be accomplished in a variety of ways, depend...
February 21, 2023
Multi-thread Java program to find all prime numbers < N
In this article, we will develop a multithreaded java program to find all prime numbers below than N. We will use Sieve of Eratosthenes algorithm to find prime numbers and it will be run in parallel.
IntroductionPrime numbers are an important and fundamental concept in mathematics, and finding all prime numbers less than a given limit is a common problem in computer science.The Sieve of Eratosthenes algorithm is a popular and efficient way to solve this problem, but it is inherently sequenti...
Resilient Backpropagation (Rprop): The Robust Optimization Algorithm for Training Deep Neural Networks
Resilient Backpropagation (Rprop) is a popular optimization algorithm used in training artificial neural networks. The algorithm was first introduced by Martin Riedmiller and Heinrich Braun in 1993 and has since been widely adopted due to its effectiveness in training deep neural networks.
In this article, we will discuss the basics of Rprop, how it works, and its advantages over other optimization algorithms.
The Basics of BackpropagationBefore diving into the specifics of Rprop, ...
Different ways to delete file in C

The C programming language, with its versatility and powerful memory manipulation capabilities, is well-suited for system programming tasks such as file management, including file deletion. The topic "Different ways to delete file in C" explores the efficient and flexible approaches to deleting files using the C programming language. Since C is widely used for developing portable applications, the different file deletion methods can be applied to various operating systems and platforms.
This ar...
February 19, 2023
Server Sent Events (SSE)

In this article, we will cover one of the important backend communication design pattern which is Server Sent Events (SSE).
Table of contents:Introduction to Sever Sent EventsWhy do we need server sent events?ImplementationExplanationConclusionIntroduction to Server Sent Events
Lets first see what happens when you enter the domain name of website or serch something on the web
The DNS server resolves the domain name into the corresponding IP( Internet Protocol) address
Now when the...