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_MAP

Unordered_map is a container that stores elements formed b...

 •  0 comments  •  flag
Share on Twitter
Published on June 21, 2023 11:54

Hyperplane in SVM

Introduction
Support Vector Machines
Hyperplane
Finding the best hyperplane
Conclusion

IntroductionHyperplane in SVM

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...

 •  0 comments  •  flag
Share on Twitter
Published on June 21, 2023 08:24

June 20, 2023

Understanding ECMAScript: The Language Behind Modern Web Development

es

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...

 •  0 comments  •  flag
Share on Twitter
Published on June 20, 2023 13:54

Binary Search on Answer

Table of ContentsIntroductionConditions for Binary Search on Unsorted ArraysTemplate for Binary Search on Unsorted ArraysTime ComplexityHandling Integer OverflowsConclusion1. Introduction

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...

 •  0 comments  •  flag
Share on Twitter
Published on June 20, 2023 05:47

June 14, 2023

Vector of Map in C++

Table of ContentsWhat is VectorWhat is MapWhat is Vector of MapComplexitySome questionsWhat is Vector?

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:
Vector
We can declare...

 •  0 comments  •  flag
Share on Twitter
Published on June 14, 2023 11:34

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)

Table of contents:What is Topological Sort used for?Overview of Topological Sort...
 •  0 comments  •  flag
Share on Twitter
Published on June 08, 2023 11:15

June 4, 2023

Trie in Java with OOPS Concepts

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 Trie

Pre-requisites:

Trie data structureTime Complexity Analysis of TrieTrie in C++ using OOP conceptsFind word with maximum frequency u...
 •  0 comments  •  flag
Share on Twitter
Published on June 04, 2023 05:09

June 3, 2023

Tuning Your AI: The Emergent Field of Prompt Engineering

Introduction to 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...

 •  0 comments  •  flag
Share on Twitter
Published on June 03, 2023 08:06

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. Arrays

Arrays 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, ...

 •  0 comments  •  flag
Share on Twitter
Published on June 03, 2023 06:59

June 2, 2023

Zeigarnik Effect in UX Design

What is the Zeigarnik Effect? Visual Response Progress Measurement Achievements and Rewards Notifications and Reminders

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...

 •  0 comments  •  flag
Share on Twitter
Published on June 02, 2023 11:47