Aditya Chatterjee's Blog, page 10

January 15, 2024

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 ...
 •  0 comments  •  flag
Share on Twitter
Published on January 15, 2024 04:12

January 1, 2024

Game Playing: Adversarial Search

What kind of games we would like to explore?Sequence of movesHas got some defined rulesRules also gives idea about reward for a moveNeed to maximize our reward

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...
 •  0 comments  •  flag
Share on Twitter
Published on January 01, 2024 10:23

December 31, 2023

Sell RSU and ESPP in India [with Purpose Code] - Maximize Return

Optimizing the sale of Restricted Stock Units (RSUs) and Employee Stock Purchase Plans (ESPPs) from foreign brokerages demands a strategic and comprehensive approach. This OpenGenus guide, tailored for Indian residents, provides insights and strategies to maximize returns while efficiently managing costs, including GST charges. Additionally, we'll explore the significant advantages of leveraging indexation in the context of RSU and ESPP transactions.

Table of contents:

Unified Strategy: Navigat...
 •  0 comments  •  flag
Share on Twitter
Published on December 31, 2023 11:10

December 27, 2023

Master Greedy Algorithm with 7 Basic Problems [Solution + Code included]

Master Greedy Algorithm with 7 Basic Problems [Solution + Code included]

In this article at OpenGenus, we will discuss the about how to master greedy algorithms by solving 7 basic problems using greedy algorithmic ideas.

TABLE OF CONTENTValid Palindrome2Queue Reconstruction By HeightShortest unSorted Continous SubarrayDota 2 SenateValid Paranthesis StringCan Place Flowerspatching ArrayOther Applications of greedyProblem 1: Valid Palindrome II

Statement : We have been given a string and we have to delete single character from it to make string palindrome.

R...

 •  0 comments  •  flag
Share on Twitter
Published on December 27, 2023 06:17

Queue::emplace in C++ STL

In this article at OpenGenus.org, we will discuss emplace method of Queue container in C++ STL.

Questions regarding emplace that will be answered in this article will be:

What does the emplace function in the Queue class do?What are the benefits of using the emplace function?What is the time complexity of the emplace function?Are there situtations when using emplace has no benefit?What are the practical applications of the emplace function?1. What does the emplace function in the Queue cl...
 •  0 comments  •  flag
Share on Twitter
Published on December 27, 2023 05:23

December 26, 2023

Vector Databases: Long-term Memory of LLMs

Table of Contents:IntroductionUnderstanding Large Language ModelsChallenges with retaining LTMWorkingEmbeddingsVector IndexingKey TakeawaysIntroduction:Vector Databases: Long-term Memory of LLMs

In the rapidly evolving landscape of artificial intelligence, Large Language Models (LLMs) have become the cornerstone of various applications, from natural language processing to content generation. These models, such as GPT-3 and its successors, demonstrate unparalleled language understanding and generation capabilities. However, the...

 •  0 comments  •  flag
Share on Twitter
Published on December 26, 2023 01:57

Virtual Memory in OS

KEY TAKEAWAYSKey Takeaways (Virtual Memory)Understanding virtual memory, demand paging, and swapping techniques is essential for optimizing memory resources and improving overall system performance.Recognizing the impact of thrashing and the role of page replacement algorithms is crucial for preventing memory-related performance bottlenecks in computer systems.Demand paging allows for the efficient utilization of memory resources, making it possible to handle memory-intensive applications ...
 •  0 comments  •  flag
Share on Twitter
Published on December 26, 2023 00:59

December 25, 2023

Task Tracking App: A Comprehensive Guide to CRUD Operations with Express.js

Screenshot_2023-11-13_18_15_52

In the fast-paced world of web development, an application's ability to perform CRUD operations (Create, Read, Update, Delete) is essential for a robust and user-friendly experience. In this OpenGenus guide, we will enhance our task tracking app by implementing update and delete functionality using Express.js. This expansion will provide users with a more dynamic and interactive task management system.

How to Use the Task Tracking App

Our task tracking app offers a straightforward user interfac...

 •  0 comments  •  flag
Share on Twitter
Published on December 25, 2023 22:38

Build a Timestamp Microservice in JavaScript (Nodejs)

In this code-driven tutorial at OpenGenus, we will build a Timestamp Microservice in JavaScript using the Express.js framework. This microservice accepts a date as a parameter and returns its Unix timestamp and UTC time. We will cover each step in detail, from project setup to error handling.

Introduction: Understanding the Project

Timestamp Microservices are a critical component of modern web and software architecture. They are a subset of microservices that serve a specific purpose related to ...

 •  0 comments  •  flag
Share on Twitter
Published on December 25, 2023 22:36