Apache Kafka is a distributed data store optimized for ingesting and processing streaming data in real-time. Streaming data is data that is continuously generated by thousands of data sources, which typically send the data records in simultaneously. A streaming platform …

4 months, 2 weeks · Read more · 14 min

Python property() Function

Python’s property() is the Pythonic way to avoid formal getter and setter methods in your code. This function allows you to turn class attributes into properties or managed attributes. Since property() is a built-in function, you can use it without importing anything. Additionally, property() was implemented in C to …

4 months, 2 weeks · Read more · 11 min

Multi-Version Concurrency Control

Multi-version concurrency control (MVCC) is currently the most popular transaction management scheme in modern database management systems (DBMSs). Although first proposed in 1978 MIT Ph.D. dissertation, it is used in almost every major relational DBMS released in the last decade. …

4 months, 3 weeks · Read more · 12 min

Bit Manipulation

Computers represent all data internally as sequences of bits. Each bit can assume the value 0 or the value 1. The bitwise operators are used to manipulate the bits of integral operands both signed and unsigned.  Unsigned integers are normally …

5 months · Read more · 45 min

Bit Tricks for Competitive Programming

Competitive Programming is a mental sport that enables you to code a given problem under provided constraints. The aim of competitive programming is to write source code of computer programs which are able to solve given problems. A vast majority …

5 months · Read more · 31 min

Dynamic Programming

Dynamic programming is an optimization approach that transforms a complex problem into a sequence of simpler problems; its essential characteristic is the multistage nature of the optimization procedure. More so than the optimization techniques described previously, dynamic programming provides a …

5 months · Read more · 9 min

Graph Data Structure And Algorithms

Graph theory may be said to have its beginning in 1736 when EULER considered the (general case of the) Königsberg bridge problem: Does there exist a walk crossing each of the seven bridges of Königsberg exactly once? The Königsberg Bridge …

5 months · Read more · 36 min

Topological Sorting

Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge u v, vertex u comes before v in the ordering. Topological Sorting for a graph is not possible if the graph …

5 months · Read more · 18 min

Coding Patterns: Two Pointers Technique

Two pointers pattern is typically used for searching pairs in a sorted array. Given a sorted array nums (sorted in ascending order), having N integers, find if there exists any pair of elements (nums[i], nums[j]) such that their sum is equal to …

5 months · Read more · 7 min

Coding Patterns: Two Heaps

What is a Heap?                            

A heap is a special Tree-based data structure in which the tree is a complete Binary Tree in which each level has all of …

5 months · Read more · 18 min

Coding Patterns: K-way Merge

In computer sciencek-way merge algorithms or multiway merges are a specific type of sequence merge algorithms that specialize in taking in k sorted lists and merging them into a single sorted list. These merge algorithms generally refer to …

5 months · Read more · 17 min

Coding Patterns: Top K Numbers

 Top K numbers pattern is very useful to solve the problems that ask us to find the top / smallest / frequent K elements among a given set.

If the problem asking us to find the top / smallest / frequent K elements among a given set, we need to think about Top K …

5 months · Read more · 8 min

Coding Patterns: Modified Binary Search

Binary Search Tree is a node-based binary tree data structure that has the following properties:

  • The left subtree of a node contains only nodes with keys lesser than the node’s key.
  • The right subtree of a node contains …

5 months · Read more · 9 min

Coding Patterns: Subsets

Set A is said to be a subset of Set B if all the elements of Set A are also present in Set B. In other words, set A is contained inside Set B. 

The subsets of any set …

5 months · Read more · 11 min

Coding Patterns: Cyclic Sort

Cycle sort is an in-place sorting Algorithm, unstable sorting algorithm, a comparison sort that is theoretically optimal in terms of the total number of writes to the original array.  Cycle sort is the most efficient in terms …

5 months · Read more · 18 min

Coding Patterns: Depth First Search

Depth-first search is an algorithm for traversing or searching tree or graph data structures. Extra memory, usually a stack, is needed to keep track of the nodes discovered so far along a specified branch which helps in backtracking of the graph. This …

5 months, 1 week · Read more · 15 min

Coding Patterns: Breadth First Search

Breadth-first search (BFS) is an algorithm for searching a tree data structure for a node that satisfies a given property. It starts at the tree root and explores all nodes at the present depth prior …

5 months, 1 week · Read more · 22 min

Coding Patterns: In-place Reversal of a Linked List

We will introduce in-place reversal of a linked list pattern, which is very useful to solve the problems involving reversal of a Linked List with the constraint that we need to do it in-place without using extra memory.

Problem: Reverse Linked List  …

5 months, 1 week · Read more · 14 min

Coding Patterns: Merge Intervals

1. Brute Force Approach

simple approach is to start from the first interval and compare it with all other intervals for overlapping, if it overlaps with any other interval, then remove the other interval from the list and merge the …

5 months, 1 week · Read more · 9 min

Coding Patterns: Fast & Slow Pointers

The fast and slow pointer technique (also known as the tortoise and hare algorithm) uses two pointers to determine traits about directional data structures. This can be an array, singly-linked list, or a graph. It is often applied to determine …

5 months, 1 week · Read more · 11 min

Coding Patterns: Sliding Window

The Sliding window is a problem-solving technique that aims to reduce the use of nested loop and replace it with a single loop, thereby reducing the time complexity. These problems are easy to solve using a brute force approach in …

5 months, 1 week · Read more · 10 min

Data Compression Algorithms


Lossless compression algorithms

5 months, 1 week · Read more · 3 min

Applications of String Matching Algorithms

String matching strategies or algorithms provide a key role in various real-world problems or applications. A few of its imperative applications are Spell Checkers, Spam Filters, Intrusion Detection System, Search Engines, Plagiarism Detection, Bioinformatics, Digital Forensics and Information Retrieval Systems etc. It is …

5 months, 1 week · Read more · 17 min

Analysis of Algorithm

When analyzing algorithms, recall that we only care about asymptotic behavior. Recursive algorithms are no different. Rather than solve exactly the recurrence relation associated with the cost of an algorithm, it is enough to give an asymptotic characterization. The Master's …

5 months, 1 week · Read more · 34 min

Pattern Searching Algorithms

Pattern Searching algorithms are also known as String Searching Algorithm, which is  used to find a pattern or substring from another bigger string. There are different algorithms. The main goal to design these type of algorithms to reduce the …

5 months, 1 week · Read more · 11 min

Z Algorithm

Z algorithm is an algorithm for searching a given pattern in a string, which is an efficient algorithm as it has linear time complexity. It has a time complexity of O(m+n), where m is the length of the string and …

5 months, 1 week · Read more · 20 min

Knuth–Morris–Pratt Algorithm for Pattern Searching

Knuth Morris Pratt (KMP) is an algorithm, which checks the characters from left to right. However, at whatever point a mismatch happens, it utilizes a preprocessed table called "Prefix Table" to skip characters examination while matching. A few times prefix …

5 months, 1 week · Read more · 17 min

Rabin–Karp algorithm

Rabin–Karp algorithm or Karp–Rabin algorithm is a string-searching algorithm created by Richard M. Karp and Michael O. Rabin in 1987 that uses hashing to find an exact match of a pattern string in a text. It also checks the pattern …

5 months, 2 weeks · Read more · 19 min

Trie of all Suffixes


A trie, pronounced “try” and also called digital tree or prefix tree, is a special data structure used to store strings that can be visualized like a graph. Comes from the word retrieval. It consists of …

5 months, 2 weeks · Read more · 14 min

Manacher’s Algorithm


Manacher's algorithm is used to find the longest palindromic substring in linear time. It is required to solve sub-problems of some very hard problems. The problem statement it solves is: Given a string 's' with the length of 'n'. …

5 months, 2 weeks · Read more · 26 min

Searching Algorithms

Searching algorithms are used to find a specified element within a data structure. Numerous different searching algorithms exist, each of which is suited to a particular data structure of format of data. Different searching algorithms are used depending …

5 months, 2 weeks · Read more · 32 min

Suffix Array


A suffix array is a sorted array of all suffixes of a given string. After sorting the suffixes in lexicographical order, we can get the suffix array. Suffix arrays can also be formed using suffix trees. A suffix array …

5 months, 2 weeks · Read more · 8 min

Amortized Analysis


In computer science, amortized analysis is a method for analyzing a given algorithm's complexity, or how much of a resource, especially time or memory, it takes to execute. The motivation for amortized analysis is that looking at …

5 months, 3 weeks · Read more · 10 min

Fibonacci Sequence

The Fibonacci sequence is a series of numbers in which each number is the sum of the two that precede it. Starting at 0 and 1, the sequence looks like this: 0, 1, 1, 2, 3, 5, 8, 13, 21, …

7 months, 4 weeks · Read more · 9 min

The operating system Linux

Classification of UNIX/Linux
UNIX is a Multi-User/Multi-Tasking operating system and exists in many different versions:Solaris, AIX, XENIX, HP-UX, SINIX, Linux.
Operating System (OS): Sum of all programs which are required to operate a computer and which control and …

11 months · Read more · 23 min

TCP/IP Networks



TCP stands for Transmission Control Protocol a communications standard that enables application programs and computing devices to exchange messages over a network. It is designed to send packets across the internet and ensure the successful delivery of data …

11 months, 3 weeks · Read more · 11 min

Programming with Sockets


Python provides a good coverage on the low-level networking interface. It all starts with BSD(Berkeley Software Distribution) socket interface. As you can assume, Python has a socket module that gives you the necessary functionality to work with the socket …

11 months, 3 weeks · Read more · 28 min

IP and DNS

The IP address labels a machine's network interface with a numeric identifier, which also identifies the location of the machine, albeit with limited reliability. Domain Name System (DNS) is a core network service that maps the names to the IP addresses …

12 months · Read more · 15 min

Interacting with Remote Systems

• Accessing SSH terminals with paramiko                         
• Transferring files through SFTP                              …

12 months · Read more · 9 min

Engaging with E-mails


E-mail is one of the most popular ways of digital communication. Python has a rich number of built-in libraries for dealing with e-mails.

The mail that you send from your client interface does not reach the …

12 months · Read more · 12 min

A Handy Security Checklist


-Don't trust data from a browser, API, or any outside sources: This is a fundamental rule. Make sure that you validate and sanitize any outside data.

-Don't keep SECRET_KEY in version control: As a best practice, pick SECRET_KEY from …

1 year · Read more · 5 min

Why asynchronous?


Like most WSGI-based web frameworks, Django is synchronous. When a client
requests a web page, the request reaches Django through a view and passes through
various lines of code until the rendered web page is returned. As …

1 year · Read more · 12 min



There are many different kinds of tests, so many, in fact, that companies often have a dedicated department, called quality assurance (QA), made up of individuals who spend their day testing the software the company developers produce.

we can divide …

1 year · Read more · 8 min

The collections module

The collection Module in Python provides different types of containers. A Container is an object that is used to store different objects and provide a way to access the contained objects and iterate over them. Some of …

1 year · Read more · 2 min


 Descriptors are the basis of complex attribute access in Python. They are used internally to implement properties, methods, class methods, static methods, and super. They are objects that define how attributes of another class can be accessed. In other words, a class can …

1 year · Read more · 2 min

Structural Pattern Matching

Structural pattern matching introduces a match statement and two new soft keywords: match and case. As the name suggests, it can be used to match a given value against a list of specified "cases" and act accordingly to the match.

1 year · Read more · 5 min

Secrets Module

The nature of random numbers generated by the random module is sufficient for statistical purposes. It uses the 
Mersenne Twister pseudorandom number generator. It has a known uniform distribution and a long enough period length that it can be …

1 year · Read more · 2 min

Formatting strings with f-strings

F-strings, also known as formatted string literals, are one of the most beloved Python features that came with Python 3.6. Introduced with PEP 498, they added a new way of formatting strings. 

Using % formatting: This is the oldest …

1 year · Read more · 3 min

Type-hinting Generics


Type-hinting annotations allow you to annotate variable, argument, and function return types with type definitions. These type annotations serve documentational purposes, but can also be used to validate your code using external tools. 

There are also static type checkers, such …

1 year · Read more · 1 min

Graphlib Module


A graph is an ordered pair G=(V,E), where Vis a finite set and E ⊆ VxV. The elements of V are called nodes or vertices,and the elements of E are called edges.

This is a module added in …

1 year · Read more · 3 min

Assignment expressions

Expressions and statements are the key building blocks of almost every programming language. The difference between them is really simple: expressions have a value, while statements do not.

Think of statements as consecutive actions or instructions that your program executes. …

1 year · Read more · 1 min

zoneinfo module

Python, starting from version 3.9, makes access to the information regarding current 
and historical time zones easier than ever. The Python standard library provides a 
zoneinfo module that is an interface to the time zone database …

1 year · Read more · 2 min

Positional-only parameters

There are two ways in which function arguments can be provided to functions:
• As a positional argument
• As a keyword argument

def concatenate(first: str, second: str, delim: str):             

1 year · Read more · 2 min