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.
Graph Algorithms Find articulation points or cut vertices in a graph Find articulation point or cut vertices in a graph. A vertex in an undirected connected graph is an articulation point or cut vertex if and only if removing it, and the edges connected to it, splits the graph into multiple components. Hint: Apply Depth First Search on a graph.
Graph Algorithms Find cut edges in a graph Find cut edges in a graph in linear time complexity using Depth First Search. A cut edge e = uv is an edge whose removal disconnects u from v. There are two key observations to solve this problem.
Graph Algorithms Depth First Search Depth-first search (DFS) algorithm is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as the root in the case of a graph) and explores as far as possible along each branch before backtracking.
Sorting Algorithms Tree sort Tree sort is an online sorting algorithm that builds a binary search tree from the elements to be sorted, and then traverses the tree (in-order) so that the elements come out in sorted order.
Sorting Algorithms Shell Sort Shellsort (also known as Shell sort or Shell's method) is an in-place comparison based sorting algorithm. Shell Sort improves its time complexity by taking the advantage of the fact that using Insertion Sort on a partially sorted array results in less number of moves.
Sorting Algorithms Binary Insertion Sort Binary search is used to reduce the number of comparisons in Insertion sort. This modification is known as Binary Insertion Sort. Binary Insertion Sort use binary search to find the proper location to insert the selected item at each iteration.
Sorting Algorithms Insertion Sort Insertion sort is an online stable in-place sorting algorithm that builds the final sorted list one item at a time. It works on the principle of moving a element to its correct position.
graph Cheriton-Tarjan Minimum Spanning tree algorithm The Cheriton-Tarjan algorithm is a modification of Kruskal's algorithm designed to reduce the O(e log e) term. Similar to Kruskal's algorithm, it grows a spanning forest, beginning with a forest of n = |G| components each consisting of a single node.
Ways to earn free cool Developer Swag on the Internet Get cool developer swag consisting of t-shirts, stickers, balls, platform credit and a pair of socks from cool companies like Google, Amazon, DigitalOcean, DevRant, Codeship and NPM. Bookmark this page to get the lastest and coolest free swag on the market.
Pew News Research shows women developers are having in-demand skills but are stuck in junior-level roles Despite the vast number of initiatives to bring gender equality to the software development world, there is still a lot of work to be done. Problem we need to address: How to ensure that women progress throughout their career?
Pew News The fastest way to learn a new language by Duolingo Language-learning app Duolingo recently gained insights into learning habits through its massive user data. The findings were published today. Lessons you can safely apply in your daily life: Sleeping in between lessons led
C++ Object Slicing in C++ Object slicing is a situation in `C++` when a derived class object is assigned to a base class object, the additional attributes of a derived class object are sliced off (not considered) to form the base class object. There are 3 key concepts involved.
Software Engineering Implementing printf and scanf in C Understanding how printf and scanf works internally is the key to writing advance code. Key concepts involved are variable number of arguments in functions using vararg in C. Use of internal buffer to prepare the input or output.
Pew News BroadcastHER grant: New Twitch fund offers grants to female streamers BroadcastHER grant: New Twitch fund offers grants to female streamers in partnership with 1000 Dreams Fund. Streams for Dreams to support charity and make Twitch more welcoming for female streamers.
Sorting Algorithms Merge Sort Algorithm Pseudocode Visual Run Complexity Implementations Applications Reading time: 20 minutes | Coding time: 10 minutes The Merge Sort is an efficient comparison based sorting algorithm based on divide and conquer strategy. It has
Sorting Algorithms Quick Sort Algorithm Complexity Implementations Optimizations Applications Discussions Reading time: 20 minutes | Coding time: 10 minutes Quicksort algorithm is a comparison based sort algorithm based on Divide and Conquer strategy that is it aims to
Sorting Algorithms Intelligent Design Sort or Quantum BogoSort Quantum Bogo Sort a quantum sorting algorithm which can sort any list in Θ(1), using the "many worlds" interpretation of quantum mechanics. The Many-Worlds Interpretation (MWI) of quantum mechanics holds
Sorting Algorithms Bogo sort Algorithm Complexity Implementations Discussions BogoSort also known as permutation sort, stupid sort, slow sort, shotgun sort or monkey sort is a particularly ineffective algorithm based on generate and test paradigm. The algorithm successively
Sorting Algorithms Bead Sort: An algorithm that works faster with hardware implementation Bead sort (gravity sort) is a natural sorting algorithm. Both digital and analog hardware implementations of bead sort can achieve a sorting time of O(n); The implementation of this algorithm tends to be significantly slower in software and can only be used to sort lists of positive integers
Sorting Algorithms Bubble Sort Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order. Implementations in Java, C++, C, Go, Swift, JavaScript and many more.
Sorting Algorithms Selection Sort Selection sort is a sorting algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning of the unsorted part. It is used when only O(N) swaps can be made and when memory write is a costly operation
Search Algorithms Exponential Search Algorithm Algorithm Complexity Implementations Applications Discussions Exponential search algorithm (also called doubling search, galloping search, Struzik search) is a search algorithm, created by Jon Bentley and Andrew Chi-Chih Yao in 1976, for searching sorted,
Search Algorithms Ternary Search Algorithm Algorithm Complexity Implementations Applications Discussions Ternary search is a divide-and-conquer search algorithm. It is mandatory for the array (in which you will search for an element) to be sorted before we begin the
Search Algorithms Jump Search Algorithm Algorithm Complexity Implementations Applications Discussions Jump Search is a searching algorithm for sorted arrays. The basic idea is to check fewer elements by jumping ahead by fixed steps or skipping some elements in
Search Algorithms Interpolation Search Algorithm Algorithm Complexity Implementations Optimizations Applications Discussions You stored 2GB of data in your computer and you successfully executed a search in a blink of an eye. Great! You may have used binary search