Aditya Chatterjee's Blog, page 14

October 26, 2023

Finding Exponent of a Number [5 approaches]

TABLE OF CONTENTS

What is an Exponent?Understanding Problem StamementSolution Approaches and Implimentations
1. Naive Approach
2. Recursive Approach
3. Divide and Conquer approach
4. Optimized Divide and Conquer
5. Binary Operator ApproachApplicationsConclusionKey Takeaways (Finding Exponent of a Number)Exponents simplify repeated multiplication and can represent both growth and decay.Solution to a smaller exponent can be used to find solution to a larger exponent.This can be seen as...
 •  0 comments  •  flag
Share on Twitter
Published on October 26, 2023 11:39

October 24, 2023

Lazy initialization in C++

Key Takeaways (Lazy initialization in C++)Lazy initialization is a technique where the creation of an object is deferred until it is actually needed. This can improve performance by avoiding the creation of objects that are never used.std::unique_ptr is the preferred method for lazy initialization. It is safe, efficient, and thread-safe. It also ensures automatic destruction of the object when it is no longer needed.std::optional is a good choice for lazy initialization when a nullable stat...
 •  0 comments  •  flag
Share on Twitter
Published on October 24, 2023 11:25

October 23, 2023

Ceiling in a Sorted Array

Key Takeaways (Ceiling in a Sorted Array) The problem can be viewed as a search problem i.e efficiently finding the lowest element in a sorted array that's greater than or equal to a given value.Finding the smallest element greater than or equal to a given value adds a unique challenge to the search problem.Binary search, leveraging the sorted array, provides an O(log N) solution, ideal for large, sorted datasets.Table Of ContentsIntroductionProblem StatementChallenge In this Problem...
 •  0 comments  •  flag
Share on Twitter
Published on October 23, 2023 11:20

Difference between java, javaw, javaws and javac

In this article at OpenGenus, we will learn about difference between java, javaw, javaws and javac in Java Programming Language.

Table of ContentsIntroductionBasic Differences betweeen java, javaw, javaws and javac.Java Compiler (javac)Java Virtual Machine (JVM)Java Application (java)Java Windowed Application (javaw)Java Web Start (javaws)Conclusion Key Takeaways Java, Javaw, Javaws, and Javac each serve distinct purposes. Javac transforms Java source code int...
 •  0 comments  •  flag
Share on Twitter
Published on October 23, 2023 11:12

October 22, 2023

Amdahl’s law

Key Takeaways (Amdahl’s law)Amdahl's law was presented by a computer scientist named Gene Amdahl.It is used to calculate the theoretical speedup the system will gain when we use multiple processors.Serial programs are the programs which can't be run in parallel and must be executed sequentially.Parallel programs are the programs that can be executed parallelySpeedup quantifies the performance improvement achieved by parallelizing a program.The Amdahl's law gives a formula for calculating...
 •  0 comments  •  flag
Share on Twitter
Published on October 22, 2023 14:00

Demystifying Kernel Density Estimation (KDE) in Python

In this article at OpenGenus, we will start by a general and a mathematical understanding of Kernel Density Estimation and then after exploring some applications of KDE, we, stepwise, implement it in Python. Finally, we talk about the space and time complexity of the python implemenation.


Key Takeaways (Kernel Density Estimation in Python)KDE is a non-parametric statistical technique for estimating the probability density function of a dataset, making no prior assumptions about the data's di...
 •  0 comments  •  flag
Share on Twitter
Published on October 22, 2023 13:45

Next Greater Frequency Element

In the world of data manipulation and algorithms, numerous intriguing challenges arise. One such challenge is finding the "Next Greater Frequency Element" in an array. This problem involves combining the concepts of frequency counting and stack-based processing to efficiently determine the next element with a higher frequency for each element in the array.

Table of contents:Problem StatementKey takeawaysApproach 1Approach 2Comparing both ApproachesReal World ExamplesProblem Statement:

G...

 •  0 comments  •  flag
Share on Twitter
Published on October 22, 2023 11:18

ML model to predict Fuel Efficiency [project]

Key TakeawaysIdentifying Significant Features: Understanding crucial vehicle features impacting fuel efficiency informs design and manufacturing priorities.Environmental Factors Matter: Climate and driving conditions influence fuel efficiency, guiding real-world optimization efforts.Data-Driven Decision Making: Data analytics and models like linear regression empower informed decisions in the automotive industry.Mean Square Error (MSE) Evaluation: Proper model evaluation, using metrics lik...
 •  0 comments  •  flag
Share on Twitter
Published on October 22, 2023 11:07

October 19, 2023

Pareto Principle in Computer Science and Software Development

Pareto Principle in Computer Science and Software Development

The Pareto Principle, commonly known as the 80/20 rule, is a foundational concept originating in economics but transcending into various domains, including computer science and software development. Named after Italian economist Vilfredo Pareto, this principle asserts that approximately 80% of effects stem from 20% of causes. In this article at OpenGenus, we'll explore how the Pareto Principle is applied in these fields, delve into the concept of the Pareto Distribution, and discuss its profound...

 •  0 comments  •  flag
Share on Twitter
Published on October 19, 2023 12:39

October 18, 2023

Paging in OS: Enhancing Memory Management

Imagine a situation where you're using your computer to work on a complex project, with multiple applications running simultaneously. As you switch between applications, you notice a significant slowdown in performance. The once snappy response times have now transformed into frustrating delays, hindering your productivity. You find yourself waiting for what feels like an eternity for an application to load or respond to your commands. Little do you know, the root cause of this sluggishness lies...

 •  0 comments  •  flag
Share on Twitter
Published on October 18, 2023 12:40