Featured Resource One-line Algorithms questions & facts Random algorithm facts for quick interview revision when you only have a minute to spare.
Book DSA Cheatsheet A Cheatsheet for data structures and algorithms practice, coding interview and problem-solving intuition.
Featured Resource One AI Systems Question Practice AI and ML systems prompts across P/D disaggregation, inference, training, RAG, platform engineering and reliability.
Data Structures Understanding Bit mask/ Bit map in depth A bit mask is a data structure, usually an integer or array of bits, that represent a bit pattern which signifies a particular state in a particular computational problem. It takes advantage of bitwise operations.
Software Engineering Understanding TF IDF (term frequency - inverse document frequency) tf-idf stands for Term Frequency - Inverse Document Frequency. It is a 2 dimensional data matrix where each term denotes the relative frequency of a particular word in a particular document as compared to other documents. This is a widely used metric in Text Mining and Information retrieval
Software Engineering Functors in C++ Function objects are another example of the power of generic programming and the concept of pure abstraction. We could say that anything that behaves like a function is a function. So, if we define an object that behaves as a function, it can be used as a function as well.
Software Engineering Decltype keyword in C++ Decltype stands for declared type of an entity or the type of an expression. It lets you extract the type from the variable so decltype is sort of an operator that evaluates the type of passed expression.
Software Engineering Auto keyword in C++ The auto keyword specifies the type of the variable that is being declared will be automatically identified by the compiler. It is used for type inference, save time while creating iterators and create method with return type as auto
Software Engineering Working with audio in HTML5 The HTML element is used to embed sound or music element in our HTML page. It may contain one or more audio sources, represented using the src attribute or the element: the browser will choose the most suitable one. We will discuss about in in later part of the article
Software Engineering Working with video in HTML5 The HTML Video tag embeds a media player which supports video playback into the document. We can use for audio content as well, but the tag may provide a more appropriate user experience.
Problems on Binary Tree Binary Tree A binary tree is a tree data structure in which each node has upto two children (that is a maximum of two children nodes), which are referred to as the left child and the right child. Implementation and applications of binary tree
Software Engineering Viewing and Changing IndexedDB contents of any website using Chrome DevTools We will try to check the IndexedDB contents of a website using Chrome DevTools. (Using Firefox Developer Tools is also very similar.) We will add a few records and then try to view and update it using the DevTools.
Software Engineering Working with IndexedDB in HTML5 IndexedDB is a JavaScript-based object-oriented database which lets you store just about anything in the user's browser. It uses indexes to search data efficiently. DOM storage is good to use to store small amount of data like login session in a website but not for storing large amounts of data
Algorithms Greedy approach to find a single maximal clique in O(V^2) time complexity There can be more than one single maximal clique in a non-complete graph (since complete graph is a maximal clique itself). To find a single maximal clique in a graph we use a straightforward greedy algorithm in O(V^2) time complexity
Algorithms Johnson Algorithm to find the shortest paths between all pair of vertices Johnson Algorithm is used to find shortest paths between every pair of vertices in a given weighted directed graph and here weights may be negative. Johnson Algorithm uses both Dijkstra and Bellman-Ford algorithms as subroutines.
Algorithms Divide numbers from 1 to n into two groups with minimum sum difference from O(2^N) to O(N) For numbers from 1 to given n, we have to find the division of the elements into two groups having minimum absolute sum difference. We will explore two techniques Brute force which will take O(2^N) time complexity and Greedy algorithm which will take O(N) time complexity
Algorithms Using Bron Kerbosch algorithm to find maximal cliques in O(3^(N/3)) BronāKerbosch algorithm is an enumeration algorithm for finding maximal cliques in an undirected graph. Any n-vertex graph has at most 3^nā3 maximal cliques, and the worst-case running time of the BronāKerbosch algorithm (with a pivot strategy) is O(3^nā3).
Algorithms Centroid Decomposition of Tree Centroid Decomposition is a divide and conquer technique which is used on trees. Given a tree with N nodes, a centroid is a node whose removal splits the given tree into a forest of trees, where each of the resulting tree contains no more than N/2 nodes.
Algorithms Clique in Graphs A clique is a subset of vertices of an undirected graph G such that every two distinct vertices in the clique are adjacent; that is, its induced subgraph is complete. Cliques are one of the basic concepts of graph theory and are used in many other mathematical problems and constructions on graphs.
Algorithms Solving Vertex Cover Problem from O(2^n) to O(n^2) Vertex Cover Problem is a known NP Complete problem. We will see Naive approach and Dynamic programming approach to solve the vertex cover problem for a binary tree graph and reduce the complexity from O(2^n) to O(n^2).
Machine Learning (ML) Understand Learning Rate by a Child's interaction with Dogs Learning rate (Ī») is one such hyperparameter that defines the adjustment in the weights of our network with respect to the loss gradient descent. It determines how fast or slow we will move towards the optimal weights
Data Structures Max Heap and Min Heap A min heap is a heap where every single parent node, including the root, is less than or equal to the value of its children nodes. The most important property of a min heap is that the node with the smallest, or minimum value, will always be the root node. Max heap is similar
Software Engineering How to handle Exceptions in Python? We should handle the exception and prevent the program from crashing and this is supported in Python. We will learn about try except block, the optional else block and Finally block which makes sure a code section runs irrespective of exceptions.
Software Engineering For Loop in Python We are going to discuss about the for loop in Python and answer the following questions: Can a For loop print the elements of a List and Tuple? Can a For Loop be used for a String? Can for loops be nested? How to use Range function in For loop? How are Continue and Break Statements used in For Loop?
Software Engineering Yield in Python The yield statement suspends functionās execution and sends a value back to caller, but retains enough state to enable function to resume where it is left off. What are generators? What is yield? Difference between return and yield Where is yield used?
Software Engineering Switch Case in Java A switch statement in Java allows an expression to be tested for equality against a list of values. Java SE 7 and later, the support for a String object is also available with switch case. We explore the basics of it like break, default statements and syntax rules
Software Engineering Explaining Classes in Python by designing a Dog Classes are the building blocks of object oriented programming and since python is an object oriented language it supports classes implicitly. Classes give us a way to model real world objects. They combine data and functions into one entity.
Machine Learning (ML) Using ID3 Algorithm to build a Decision Tree to predict the weather ID3 algorithm, stands for Iterative Dichotomiser 3, is a classification algorithm that follows a greedy approach of building a decision tree by selecting a best attribute that yields maximum Information Gain (IG) or minimum Entropy (H). We will use it to predict the weather and take a decision