Aditya Chatterjee's Blog, page 146
November 9, 2021
Best First Search algorithm
Best First Search is a searching algorithm which works on a set of defined rules. It makes use of the concept of priority queues and heuristic search. The objective of this algorithm is to reach the goal state or final state from an initial state by the shortest route possible.
Table of contents:
What are Searching algorithms?What is Best First Search?Comparison of Best First Search AlgorithmExample of Best First SearchAdvantages and Disadvantages of Best First Search AlgorithmWe will get...
A * Search Algorithm
In this article, we are going to have a look at the A * Search Algorithm , its properties, some of its advantages and disadvantages as well as real life applications.
Table of contents:
What is A * Search Algorithm?A * search algorithm propertiesAdvantages and Disadvantages of A * SearchApplications of A * SearchLet u get started with A * Search Algorithm.
What is A * Search Algorithm?A * Search algorithm is an informed search algorithm, meaning it uses knowledge for the path searching pr...
November 8, 2021
Testing in Rust
One of the greatest tools a programmer can have under their belt is the ability to write tests to ensure the code they are producing functions well. Rust of course has a way of writing tests, and this allows a test driven development cycle.
Table of contents
Test Driven developmentSimple tests in RustTest flagsExampleTest Driven DevelopmentWhat does this mean? Well, suppose you want to write a function that adds two numbers. You can first write a test, in which you say, if I call this fun...
Design Tic Tac Toe Game (in JavaScript)
In this article, we have demonstrated how to design Tic Tac Toe Game as a webpage using HTML, CSS and JavaScript. We have presented all code and you should follow this mini-project.
Table ContentIntroductionHow to function the game?Code Development3.1. HTML file development
3.2. CSS file development
3.3. JavaScript file development and ImplementationFinal Considerations
References1. Introduction
The earliest reference to the Tic Tac Toe game dates from the excavations at the temple of Ku...
Dying ReLU Problem
In this article, we will understand What is ReLU? and What do we mean by “Dying ReLU Problem” and what causes it along with measures to solve the problem.
Table of Contents:
IntroductionWhat are (Artificial) Neural Networks?What are Activation Functions in Neural Networks?What is ReLU?What is Dying ReLU?What causes a Dying ReLU Problem?How to solve Dying ReLU Problem? Introduction:Rectified Linear Unit i.e. ReLU is an activation function in Neural Network. Hahnloser et al. first propos...Median of Medians Algorithm
In this post, we explained the median of medians heuristic, its applications and usefulness as well as its limitations. Median of Medians Algorithm is a Divide and Conquer algorithm.
Table of contents:
What is median of medians heuristic?Why you may need "Median of Medians"?Median of Medians AlgorithmTime and Space Complexity of Median of Medians AlgorithmProofs: Why is this pivot good?Let us get started with Median of Medians Algorithm.
What is median of medians heuristic?It is an appro...
System Design of WhatsApp
In this article, we shall be diving into how conceptually, a large scale chat messaging application like WhatsApp could be designed. We will also be looking into the specific technology Whatsapp employs for its architecture.
Table of ContentIntroductionKey features the system will supportDefining the constraints and requirements of the systemDiving into the designSystem Architecture of WhatsappIntroductionWhatsapp is a massive multiplatform messaging application that allows users to sha...
November 7, 2021
Making A Large Island by changing one 0 to 1
Reading time: 20 minutes | Coding time: 15 minutes
In this article, we have explored an insightful approach/ algorithm to find the largest island by changing one 0 to 1 in MxN matrix. This is an extension of Number of Islands in MxN matrix (of 0 and 1)
TABLE OF CONTENTSPre-requisitesProblem statement definitionProblem analysisSolution analysis (algorithm)PsuedocodeImplementationJAVAC++Complexity AnalysisTime-ComplexitySpace-ComplexityApplicationsPRE-REQUISITESBFSDFS...Time & Space Complexity of Bellman Ford Algorithm
In this post, we do an analysis the Bellman Ford's single source shortest path graph algorithm to find its computational Time and Space complexity for Best case, Worst case and Average Case.
Table of contents:
Introduction to Bellman Ford AlgorithmTime Complexity AnalysisWorst Case Time ComplexityAverage Case Time ComplexityBest Case Time ComplexityIn Summary, Time & Space Complexity for Bellman Ford Algorithm:
Worst Case Time Complexity: O(V3)Average Case Time Complexity: O(E V)Best C...Power and Exponential functions in math.h Header file in C/ C++
In a simple way a Library is collection of builtin functions.One of the header file of standard C library is "math.h".As the name itself suggests,It defines various mathematical functions.The noticable thing is that all the arguements and return types of the functions of this header file is double.In this post we will discuss about power and exponentiation functions in this header file.
Table of contents:
double pow(double x,double y)double exp(double x)double pow(double x,double y)Unlike ...