Aditya Chatterjee's Blog, page 139
December 6, 2021
Asynchronous programming in JavaScript
In this article, we have explored Asynchronous programming in JavaScript including ideas like callback, promises, async, await, loop and much more.
Table of Contents1. Introduction2. Difference between synchronous and asynchronous function3. Callback Function4. Promises5. Async/Await6. Loop7. Final ConsiderationsReference
1. Introduction
In a synchronous programming module, the execution of code steps takes place one at a time. In other words, a new function never starts until the pre...
Absolute value of Integer using Bitwise Operations
In this article, we have explained two approaches to find the Absolute value of Integer using Bitwise Operations namely Right shift, OR and XOR operations.
ContentsIntroductionIntegers in binaryShifting bitsPositive NumberNegative NumberXOR in binaryResultA second approachSum UpIntroductionIf we define what's Absolute value, then it says that "The distance of some number from the zero is an Absolute Value".
Which means if there is some given number +/- N then the Absolute Valu...
U-Net architecture
In this article, we have explained U-Net architecture along with other key ideas like Downsampling and Upsampling path with features and applications of U-Net.
Table of contents:
Introduction to U-NetU-Net ArchitectureDOWNSAMPLING PATHUPSAMPLING PATHTraining of U-NetSome features of U-NetApplications of U-NetIntroduction to U-NetIn this article, we will be specifically discussing about the architecture of U-Net model.U-Net is an architecture for semantic segmentation, it made a hug...
Furthest Pair of Points (+ Rotating Calipers Method)
In this article, we have explained how to solve the problem of Furthest Pair of Points using Rotating Calipers Method. We have presented the naive approach as well.
Table of ContentsIntroductionNaiveRotating CalipersOverviewPrerequisite: Closest Pair of Points
IntroductionIn this article, we will cover finding the furthest distance away pair of points in a given space.
For example:
Number of points (N) = 4Points = (0,1)(0,0)(4,0)(0,5)Output = 6.403Largest distance between the points ...Different Code Optimizations in Compiler Design
In this article, we have listed and explained Different Code Optimizations in Compiler Design such as Peephole optimization, loop unrolling, Loop-invariant code motion and much more.
Table of ContentsIntroductionPeephole optimizationReduntant load/store eliminationConstant foldingStrength reductionNull sequencesCombining operatorsLoop unrollingLazy evaluationMore optimizationsRegister allocationLoop-invariant code motionBounds-checking eliminationTail call optimizationOverv...Parallel Bubble Sort
In this article, we have explored how to implement Bubble Sort in parallel on multiple threads / cores. We have presented two approaches: one is slower than the sequential approach but the other approach is significantly faster than all other approaches for large input.
Table of contents:
Introduction to Parallel Bubble SortParallel Bubble SortSequential Bubble Sort AlgorithmParallel Bubble Sort using ThreadsAlternate Parallel bubble sort using threads (with faster runtime)Comparison of 3 ...December 5, 2021
Time and Space Complexity of Hash Table operations
This article covers Time and Space Complexity of Hash Table (also known as Hash Map) operations for different operations like search, insert and delete for two variants of Hash Table that is Open and Closed Addressing.
Table of contents:
What is hashing?Collision Resolution2.1. Open Addressing
2.2. Closed AddressingTime Complexity
3.1. Time Complexity of Searching in Hash Table
3.2. Time Complexity of Insertion and deletion in Hash TableSpace Complexity
As a summary:
Time Complexity For op...
Create a Heap from Array of N integers
In this post, we discuss the heap data structure and how to create a min and max heap from N given integers in form of an Array. Similarly, inserting elements one by one take O(N logN) time but the optimal approach takes O(N) time.
Table of contents:
Introduction to HeapBuilding a Heap from ArrayTime Complexity AnalysisApplications and problems solved with heapsPrerequisites:
Heap data structureHeap SortIntroduction to HeapA heap is a binary tree that satisfies the heap property.
The ...
Goldbach's Conjecture
In this article, we shall be looking at the intriguing Goldbach's Conjecture, one of the best known unsolved problems in mathematics. Later on, in the article, we shall find the Goldbach pairs of all numbers that range from 1000 to 2000.
Table of contents:
Understanding Goldbach's ConjectureInteresting Concepts Related to the Goldbach's ConjectureGoldbach's weak ConjectureGoldbach Function and Goldbach's cometSchnirelmann DensityOther ContributionsAlgorithm to find the Goldbach Pair of...December 4, 2021
Linear Activation Function
In this article, we have explored Linear Activation Function which is one of the simplest Activation function that can be used Neural Networks.
Table of contents:
What are Activation Functions?Why are Activation Functions required?Linear Activation FunctionsComparison Between Linear Activation Function and Other Activation FunctionsPrerequisite:
Basics of Activation FunctionTypes of Activation FunctionWhat are Activation Functions?Activation functions are mathematical equations that d...