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.
Software Engineering Working with device location using HTML Geolocation API HTML Geolocation API is used to get the current position of the user. The Geolocation API is used using the navigator.geolocation object.The Geolocation interface represents an object able to programmatically obtain the position of the device.
Software Engineering Working with HTTP requests in Python The internet is made up of a bunch of resources hosted on different servers and interact using HTTP. What is HTTP and how it works? Working with different HTTP requests in Python using the requests library Understanding the information that web resources interact with and use it programmatically
Software Engineering Understanding and working with Memset in C memset is a memory utility in C which is used to set a particular value to a range of memory locations in an efficient way. On going through this article, you will understand How to use memset? and Why performance of memset is better than a simple implementation?
Software Engineering Working with Typedef in C typedef is a keyword in C programming language,which stands for type definition. How to use typedef? Why and when to use typedef? Difference between typedef and define
Software Engineering boolean (bool or _Bool) datatype in C C programming language (from C99) supports Boolean data type (bool) and internally, it was referred as `_Bool` as boolean was not a datatype in early versions of C. In C, boolean is known as bool data type. To use boolean, a header file stdbool.h must be included to use bool in C.
Software Engineering Working with character (char) in C C uses char type to store characters and letters. However, the char type is integer type because underneath C stores integer numbers instead of characters. Characters supported by a computing system depends on the encoding supported by the system.
Software Engineering Reading Data from Files in Java We will explore 5 different ways of reading files in Java BufferedReader, Scanner, StreamTokenizer, FileChannel and DataInputStream. What is the role of encodings like UTF-8 in reading data in Java? Exception/ Errors you may encounter while reading files in Java
Machine Learning (ML) Different types of Autoencoders Autoencoder is an artificial neural network used to learn efficient data codings in an unsupervised manner. There are 7 types of autoencoders, namely, Denoising autoencoder, Sparse Autoencoder, Deep Autoencoder, Contractive Autoencoder, Undercomplete, Convolutional and Variational Autoencoder.
Algorithms Find Mother Vertex in a GraphăO(V+E)ă mother vertex in a graph is a vertex from which we can reach all the nodes in the graph through directed path. If there exist mother vertex (or vertices), then one of the mother vertices is the last finished vertex in DFS. (Or a mother vertex has the maximum finish time in DFS traversal).
Software Engineering Working with Clipboard API and events in HTML The Clipboard API provides a way to hook into the common clipboard operations of cutting, copying and pasting so that web application can adjust the clipboard data as required. There are two ways we can interact with the system clipboard Document.execCommand() and asynchronous Clipboard API
Software Engineering Working with images in HTML Images can be inserted into our HTML page using tag. The tag is an empty tag, which means that it does not have a closing tag. We can insert parameters of the element using various attributes like src, alt, height and width.
Software Engineering Creating and resolving Deadlocks in Java The term Deadlock refers to a situation in multithreading, where two or more threads are blocked forever, waiting for each other. In Java, we use synchronized keyword to make the class or method thread-safe.The keyword ensures that only one thread can access the resource at a given point of time.
Algorithms Kosaraju's Algorithm for Strongly Connected Components ăO(V+E)ă Kosaraju algorithm is a DFS based algorithm used to find Strongly Connected Components(SCC) in a graph. It is based on the idea that if one is able to reach a vertex v starting from vertex u, then one should be able to reach vertex u starting from vertex v
Data Structures Fibonacci Heap A Fibonacci heap is a heap data structure similar to the binomial heap. It uses Fibonacci numbers and also used to implement the priority queue element in Dijkstraâs shortest path algorithm which reduces the time complexity from O(m log n) to O(m + n log n)
Algorithms Count paths from Top Left to Bottom Right of a Matrix using Dynamic ProgrammingăO(M*N)ă Count all the possible paths from top left to bottom right of a m x n matrix with the constraints that from each cell you can either move only to right or down. Brute force approach takes exponential time while dynamic programming takes O(M*N) time complexity
Algorithms Using Farach Colton and Bender Algorithm to solve LCAăO(V) queryă The basic idea of Farach Colton and Bender Algorithm is to traverse all the nodes using the Depth First Search graph traversal and keep a record of all the visited nodes and there corresponding heights. This allows to answer LCA queries in O(V) time complexity
Software Engineering Variables and Datatypes in Kotlin In this article, you will learn How to declare variable in Koltin?, How kotlin infers the type of variables? and How to work with various data types?
Algorithms Finding the Lexicographical Next Permutation in O(N) time complexity In Lexicographical Permutation Algorithm we will find the immediate next smallest Integer number or sequence permutation. Finding all permutations take O(N!) time complexity but we present an efficient algorithm which can solve this in O(N) time complexity
Algorithms Heapâs algorithm for generating permutations Heap's Algorithm is used to generate all the possible permutation of n-decimals of a number. It generates each permutation from the previous one by interchanging a single pair of elements; the other nâ2 elements are not disturbed. For N numbers, it takes O(N!) time complexity
Software Engineering Working with history object of HTML DOM The browsers history is present in the history object. We can use the window part (window.history) or just simply history. It contains an array of URLs or links visited by the user.
Machine Learning (ML) Whitening with PCA with code demonstration When we are training our model on images, the raw input is quite redundant because the pixels that are adjacent to each other are highly correlated. The goal of Whitening is to reduce redundancy in these images by making features less correlated to each other and same variance
Algorithms Algorithm to find cliques of a given size kăO(n^k) time complexityă We can find all the 2-cliques by simply enumerating all the edges. To find k+1-cliques, we can use the previous results. Compare all the pairs of k-cliques. If the two subgraphs have k-1 vertices in common and graph contains the missing edge, we can form a k+1-clique.
Algorithms Minimum Product Subset of an array For a given array of elements, we have to find the non-empty subset having the minimum product. We will explore two techniques brute force O(2^N) and Greedy algorithm O(N)
Algorithms Maximum Product Subset of an array For a given array of elements, we have to find the non-empty subset having the maximum product. We will explore two techniques brute force O(2^N) and Greedy algorithm O(N)
Software Engineering Docstrings in Python Docstrings in Python like comments provide us a convenient way of associating documentation to the source code. Docstrings are not stripped but are retained through out the runtime of the program. They specify what the function does not how it does. Docstrings are used in functions, classes