Aditya Chatterjee's Blog, page 38

April 17, 2023

Applications of Thermodynamics

In this article at OpenGenus, we have explained applications of Thermodynamics in our day to day lives.

Table of contentsWhat is thermodynamics?Branches of thermodynamics and its applicationsApplications of thermodynamics in day to day lifeConclusionWhat is thermodynamics?Thermodynamics is a branch of science, more specifically branch of physics that deals with the relation between heat, temperature,work and energy.There are various laws of thermodynamics which explain the behavior of ...
 •  0 comments  •  flag
Share on Twitter
Published on April 17, 2023 14:06

Selection sort in C

In this article at OpenGenus, we have explained selection sort and implemented a program on the same in C Programming Language.

Table of contentsWhat is Selection sort?How selection sort worksApproach to write the programImplementationOutputTime complexityDrawbacks of selection sortWhat is Selection sort?Selection sort is one of the most simple and easy sorting algorithms.It works by first finding the smallest element and swapping it with the first element in the array.Then the siz...
 •  0 comments  •  flag
Share on Twitter
Published on April 17, 2023 14:03

Custom Exceptions in Java

Custom Exceptions in Java

Table of contents:

What is An ExceptionSteps Involved in Creating Custom ExceptionsReasons For Using Custom ExceptionsBenefits Of Creating Custom ExceptionsWhat is an Exception?

A runtime error that arises during the execution of a program is referred to as an exception. There are two types of exceptions:

Built-in ExceptionsCustom Exceptions

In this article at OpenGenus, custom exceptions will be discussed.

The term "custom exception" or "user-defined exception" refers to the creation o...

 •  0 comments  •  flag
Share on Twitter
Published on April 17, 2023 04:04

Fibonacci sequence in C

In this article at OpenGenus, we will explore how to generate a fibonacci sequence and implement a program in C Programming Language to demonstrate the concept.

TABLE OF CONTENTQUESTIONAPPROACH TO SOLUTIONIMPLEMENTATIONOUTPUTQUESTION

Here we are going find the first n numbers of a Fibonacci sequence by using C pogramme.
Where"n" is the number of terms by using for loop.

APPROACH TO SOLUTIONFibonacci sequence :The fibonacci sequence starts from 0 then 1 and then addittion of the preccedi...
 •  0 comments  •  flag
Share on Twitter
Published on April 17, 2023 03:51

C program to check if given letter is a vowel, consonant or an alphabet

In this article at OpenGenus, we will check whether the given alphabet or letter is a vowel, consonant or an alphabet. We have demonstrated this with a C program.

TABLE OF CONTENTQuestionApproach to the solutionImplementationOutputQUESTION

The problem is to write a pogram in C to read a character from the user and test it whether it a vowel or consonant or not an alphabet.

For example if we choose the alphabet "A", the output should be an vowel

APPROACH TO THE SOLUTION

Here Vowel: is defi...

 •  0 comments  •  flag
Share on Twitter
Published on April 17, 2023 03:18

Virtual Environments: What are they?

Virtual Environment IntroductionVirtual Environments: What are they?

Virtual environments are isolated or private spaces within a computer system where software and dependencies can be installed and managed independently of the system-wide environment. They are frequently employed in software development to establish separate environments for various projects or applications, each with unique dependencies, configurations, and Python packages.

To ensure that the dependencies and configurations used during development and testing ar...

 •  0 comments  •  flag
Share on Twitter
Published on April 17, 2023 02:51

April 16, 2023

Hollow and Filled Square pattern in C++

In this article, we will learn how to generate both a hollow and filled square pattern in C++.

Table of contents:

Introduction to Problem StatementSolving the problemImplementing the SolutionTime and Space ComplexityIntroduction to Problem Statement

Given the side of a square, write a C++ implementation to generate hollow and filled square pattern.

Solving the problem

A hollow square pattern is one where the border of the square is drawn, but the inside is left empty. On the other hand, a ...

 •  0 comments  •  flag
Share on Twitter
Published on April 16, 2023 09:27

April 15, 2023

Merge Sort in C

In this article at OpenGenus, we have explained merge sort and implemented a program on the same in C Programming Language.

Table of contentsWhat is merge sort?How merge sort worksApproach to write the programImplementationOutputTime complexityDrawbacks of merge sortWhat is Merge sort?

Merge sort is a sorting algorithm that works by dividing the main array into smaller arrays and sorting each of the smaller arrays and putting them back together.

How Merge sort worksFor example if we ...
 •  0 comments  •  flag
Share on Twitter
Published on April 15, 2023 14:02

Fundamentals of Naive Bayes Algorithm

Naive Bayes is an Machine Learning Algorithm which is commonly used for classification problems. It is a simple yet highly efficient algorithm that can handle high-dimensional data with a relatively small number of training examples. This article aims to walk you through the fundamentals of the algorithm with an example to explain its working.

Table Of Contents:

Introduction to Naive Bayes Algorithm.Working of the algorithm.Applications of the algorithm.Introduction to Naive Bayes Algorithm...
 •  0 comments  •  flag
Share on Twitter
Published on April 15, 2023 03:05

April 14, 2023

My Calendar III Problem [Solved with Segment Tree, Sweep Line]

In this article at OpenGenus, we have solved the Calendar 3 problem that is to find number of conflicting meetings in a given range of time. We have solved this using the concept of Sweep Line and Segment tree with Lazy Propagation.

Table of contents:

Problem DescriptionBrute Force solutionApproach 1: Sweep-line AlgorithmApproach 2: Segment tree with Lazy propagation

Learn:

Calendar 1 problemSweep-line AlgorithmSegment TreeSegment tree with Lazy propagationProblem Description

You are...

 •  0 comments  •  flag
Share on Twitter
Published on April 14, 2023 12:59