Aditya Chatterjee's Blog, page 155
September 13, 2021
Jinja Template for Django Framework

In this article, we have explored the Jinja Template. Jinja is a modern, designer-friendly templating language for python, modeled after django templates and is widely used for execution.
In a template, the variables can be replaced by placing relevant values.
Example:{{ fruit }} is the national fruit of {{ country }}
Fruit: mango and country: india
Mango is the national fruit of india
Template engines are more often used in web apps.
An HTML example:
{{title}}{{header}}{{body}}
I ...
September 12, 2021
Adding 2 integers as linked lists
In this article, we will represent an Integer as Singly Linked List and define an addition algorithm to add two integers as Linked Lists. This is used to add very large integers which is not stored in existing data types.
Table of Contents:
Linked listsAddition of two integers as linked listsAlgorithmRepresenting a number as a linked listsImplementationExampleTime and space complexityIntroduction to Linked listsLinked lists are a type of data structure that stores data in a dynamica...
With statement in Python
In this article, we have covered what is the With statement in Python and how to use it along with the idea of Context Manager in Python.
Table of contents:
What is the With statement?Python Examples using the With statementHow does the With statement work?Context Manager and using With in User Defined ObjectsLet us get started with the exploration of With statement in Python.
What is the With statement?The With statement is a keyword in Python is used to provide exception handling functi...
100+ Graph Algorithms and Techniques [Complete List]
In this article, we have listed 100+ problems on Graph data structure, Graph Algorithms, related concepts, Competitive Programming techniques and Algorithmic problems. You should follow this awesome list to master Graph Algorithms.
There are different categories of problems like Topological Sorting, Shortest Path in Graph, Minimum Spanning Tree, Maximum Flow Problem, Graph Coloring Problem, Maximum Matching Problem and much more.
Basics of Graph AlgorithmsThese are basic ways to represent a Gra...
September 11, 2021
Word Embedding [Complete Guide]
![Word Embedding [Complete Guide]](https://i.gr-assets.com/images/S/compressed.photo.goodreads.com/hostedimages/1631473821i/31913833._SX540_.png)
In this article, we have explained the idea behind Word Embedding, why it is important, different Word Embedding algorithms like Embedding layers, word2Vec and other algorithms.
Table of contents:
Introduction to Word EmbeddingIs Word Embedding Important?Word Embedding Algorithms3.1. Embedding Layer
3.2. Word2Vec
3.2.1. Skip-Gram
3.2.2. Continuous Bag of Words (CBOW)
3.3. GloVeConclusion
Let us get started.
Introduction to Word EmbeddingMaybe some of you that read this article have a basi...
Swap 2 variables [6+ techniques]
In this article, we have explored about Swapping of 2 variables. We have presented different methods to do so including swapping using third variable, using arithmetic operations, XOR, macro and much more along with their pros and cons.
Table of ContentsIntroduction to SwappingUsing a third variableUsing arithmetic operators and -Using arithmetic operators * and /Using bitwise XOR operator ^Using a macroOther MethodsUsing a file as bufferUsing a command-line-related variable as buff...September 6, 2021
Two Pointer Technique in Array
In this article, we have explained the Two Pointer Technique/ algorithm in array which is used to solve a vast range of problems efficiently. Problems include Reversing an array and Find if a pair with given sum exists in a sorted array.
Table of contents:
Introduction to Two Pointer TechniqueExample Problem 1: Reverse an arrayExample Problem 2: Find if a pair with given sum exists in a sorted arrayLet us get started with Two Pointer Technique.
Introduction to Two Pointer TechniqueTwo poin...
How to take string input in C?
In this article, we have explained how to take string input in C Programming Language using C code examples. We have explained different cases like taking one word, multiple words, entire line and multiple lines using different functions.
Table of contents:
String input using scanf Function1.1. Reading One Word
1.2. Reading Multiple Words
1.3. Reading Multiple Words to Form a Line
1.4. Reading an entire lineUsing getcharReading Entire Line using gets()Read One Line at a Time from a File usi...
calloc() in C / C++
In this article, we have explained the use of calloc() function in C / C which is used for Dynamic Memory Allocation. We have explained it with code examples with different situations.
Table of contents:
What is Calloc?What is Dynamic Memory Allocation?Examples of calloc()calloc() vs malloc()calloc(): pros & consLet us get started with calloc() in C/ C .
What is Calloc?The calloc() "contiguous allocation" function in C (and due to backwards compatibility: C ) allocates a block of mem...
September 5, 2021
System Design of GitLab
This article talks about the Gitlab system design with a simplified overview of its architecture as well as explanation on the working of the important Gitlab architecture components. The System Design of GitHub will be on similar lines.
GitLab is a web-based DevOps lifecycle tool that provides a Git repository manager providing wiki, issue-tracking and continuous integration and deployment pipeline features, using an open-source license, developed by GitLab Inc.
The simplified gitlab architectu...