Aditya Chatterjee's Blog, page 9
January 28, 2024
Why convexity is important in Machine Learning?
Convexity is important in ML because:
Optimization problems have a single global minimum.It ensures that any local minimum is also the global minimum.It often leads to more robust and stable optimization.Optimization algorithms will converge to the optimal solution.Convex functions are easier to analyze mat...BigInteger in Java
BigInteger is one of the useful classes found in java.math library. It is used to represent arbitrary precision integers. It comes in handy when we want to deal with digits that primitive integers can no longer handle, numbers whose capacity is way beyond 32 and 64 bits. BigIntegers allow us to work with virtual...
January 26, 2024
Minimum Absolute Difference Between Elements With Constraint
In this article at OpenGenus, we will solve the problem called Minimum Absolute Difference Between Elements With Constraint. The article will guide you through the intuition of how to solve the problem using the concept of Binary Search and Ordered Set which is frequently asked in coding interviews of various tech companies.
Table of contents:Problem StatementTwist in ProblemIntiution behind using Binary Search and Ordered SetImplementing the SolutionTime and Space Complexity1. Problem S...Maximum Profit by Buying and Selling a Share at Most k Times
In this article at OpenGenus, we will solve the problem of getting maximum profit by buying and selling a share at most k times. The article will guide you through the intuition of how to solve the problem using the concept of backtracking and dynamic programming which is frequently asked in coding interviews of various tech companies.
Table of contents:Problem StatementIntuition behind using BacktrackingWhy need Dynamic Programming ?Implementing the SolutionTime and Space Complexity1. P...Specificity in CSS [3 types]
Have you ever wondered why no matter what you do, the styles you define just dont seem to work!. Well, It could be that the style you are applying right now is not winning the battle with previous styles or styles from a library such as bootstrap. This OpenGenus article will explore how CSS specificity works and you will have an idea of how you can take control over your CSS styles.
Table of contents:
SpecificitySo how do we use css together with HTML!Inline vs Internal vs ExternalSelector S...January 25, 2024
nth_element in C++ STL
nth_element is a function in the C++ Standard Template Library (STL) that allows you to partially sort a range of elements in a container, such that the element at the nth position is the one that would be at that position if the entire range was sorted. The elements before and after the nth position are not sorted.
Table of ContentsIntroductionSyntax & ParametersInternal Implementation in C++ STLTime ComplexitySpace ComplexityVariationsExamplesUse CasesConclusion1. Introductionnth...
Open World RPG Game in Python
Table of contents:
IntroductionStep 1: Create Player ClassStep 2: Define Character TypesStep 3: Implement Player Creation and LoginStep 4: Implement Open World ExplorationStep 5: Testing our RPG GameConclusionReading time: 25 minutes
IntroductionIn this OpenGenus article, we will cover the steps necessary for creating your very own open-world RPG game in Python programming language. An open-world RPG is a gaming genre that involves world exploration, character roles, combat, and an i...
January 15, 2024
Analog voice-based media storage for compressed data transfer of images post-encryption
This OpenGenus article discusses the availability of analog voice-based media storage enables the encoding of digital image data into analog audio signals, offering an unconventional approach to data storage and transfer. It leverages traditional analog audio rec...
Strategy Design Pattern in Software Design [Java]
In the dynamic realm of software development, creating flexible and maintainable code is paramount. The ability to adapt to changing requirements, accommodate diverse functionalities, and simplify code maintenance are perpetual challenges faced by developers. One valuable tool in addressing these challenges is the Strategy Pattern.
Table of contents:
Understanding the Strategy PatternCore ComponentsReal World AnalogyDefine a family of algorithmsImplement concrete strategiesUse composition ...January 1, 2024
Game Playing: Adversarial Search
The goal of adversarial search is to create an intelligent agent that can make decisions to maximize its chances of winning the game. The agent needs to consider the possible moves of both players and anticipate the outcomes of these moves to make informed decisions.
Table of contents:
Two player GamesSome DefinitionsMini-max alg...