Aditya Chatterjee's Blog, page 26
June 21, 2023
Insert element in unordered_map in C++ STL [3 methods]
In this article at OpenGenus, we will explore different ways to insert elements in unordered_map in C++ STL. This can be greatly helpful in using maps and solving complex coding questions.
TABLE OF CONTENTSIntroduction to unordered_mapInsertion in Unordered_mapMethod 1 : Insert()SyntaxCodeOutputMethod 2 : [] operatorSyntaxCodeOutputMethod 3 : Emplace()SyntaxCodeOutputTime ComplexityINTRODUCTION TO UNORDERED_MAPUnordered_map is a container that stores elements formed b...
Hyperplane in SVM
Support Vector Machines
Hyperplane
Finding the best hyperplane
Conclusion
Introduction

Support Vector Machines (SVMs) are powerful machine learning models that can be used for both classification and regression tasks. In classification, the goal is to find a hyperplane that separates the data points of different classes with maximum margin. This hyperplane is known as the "optimal hyperplane" or "maximum-margin hyperplane".
To understand the concept of the hyperplan...
June 20, 2023
Understanding ECMAScript: The Language Behind Modern Web Development
In the world of web development, ECMAScript plays a crucial role as the standardized scripting language that powers modern web browsers. ECMAScript, often referred to as ES, is the official name for the language specification that popular implementations such as JavaScript are based on.
In this article at OpenGenus, we will explore the fundamental concepts of ECMAScript, its history, features, and its significance in web development. Whether you're a newbie or a seasoned developer, this article...
Binary Search on Answer
Binary search is commonly associated with sorted arrays, but it can also be applicable to unsorted arrays in certain cases. These types of problems are known as "binary search on answer" problems. In this article, we will explore how binary search can be used on unsorted arrays and provide a template f...
June 14, 2023
Vector of Map in C++
In this article at OpenGenus, we will mainly know about vector of map. Beforehand, we will know briefly about what is vector in C++. Vector is a part of Standard Template Library of C++. It is mostly like array but the key difference is the size of the vector can be defined or changed dynamically which means during the execution of our program.
Here is the visualization:
We can declare...
June 8, 2023
Time Complexity of Topological Sort
In this article at OpenGenus, you will learn about Time Complexity of Topological Sort. Specifically, the version of Topological Sort using Khan's Algorithm, which uses Breath First Search with a Queue. The tutorial will cover the mathematical runtime analysis of the best, average and worst cases.
In short:
Best case time complexity: Θ(E+V)
Average case time complexity: Θ(E+V)
Worst case time complexity: Θ(E+V)
June 4, 2023
Trie in Java with OOPS Concepts

In this article at OpenGenus, we have explored the basics of Trie data structure and how to implement Trie in Java Programming Language from scratch using OOP concepts.
Table of contents:
What is Trie?Structure of TrieWhy Trie?Trie in Java with OOPS ConceptsInsertionDeletionSearchHow to use Trie object in Java?Complete Java CodeApplications of TriePre-requisites:
Trie data structureTime Complexity Analysis of TrieTrie in C++ using OOP conceptsFind word with maximum frequency u...June 3, 2023
Tuning Your AI: The Emergent Field of Prompt Engineering
Prompt engineering is an exciting and rapidly evolving field in the world of artificial intelligence (AI). It is the process of designing, testing, and optimizing inputs, or "prompts," to instruct AI models to generate desired outputs.
While it may seem simple on the surface, prompt engineering is a complex process that requires an understanding of both the AI model’s abilities and the problem at hand. The potential of AI largely rests on our ability to enginee...
Different built-in data structures in JavaScript
JavaScript has a few built-in data structures and in this article at OpenGenus, I will explain their purpose and show examples of their implementations.
Table of contents:
Arraysregular arraystyped arraysSetssetweaksetMapsmapweakmap1. ArraysArrays are collections of elements. These elements can be strings, numbers, objects, boolean values, or other arrays. Each element has an index (starts with 0) and by referencing their index, we can manipulate the array.
In this article, ...
June 2, 2023
Zeigarnik Effect in UX Design
Reading time: 5 minutes
What is the Zeigarnik Effect?The Zeigarnik effect is a psychological theory that states that people remember incomplete or unfinished tasks better than complete ones. In UX design, this principle can be used to increase user engagement and create user interactions that are more memorable. We will discuss a couple of ways this c...