## Baeldung on Computer Science

• All
• Math and Logic (16)
• Algorithms (14)
• Machine Learning (13)
• Trees (10)
• Sorting (10)
• Programming (9)
• Graph Traversal (8)
• Searching (5)
• Graphs (5)
• Data Structures (4)
• Path Finding (3)
• Deep Learning (3)
• Artificial Intelligence (3)
• Latex (2)
• Data Science (2)
• Security (1)
• Graph Theory (1)

### Dominating Sets and Domination Numbers in Graph Theory

Learn about the dominating sets and the domination number of graphs.

### Node Degrees

Learn the definitions of a node’s degree, indegree, and outdegree.

### How to Root a Tree?

Learn how to root a tree using the depth-first traversal.

### Eccentricity, Radius, Diameter, Center, and Periphery

Learn about several concepts from graph theory: eccentricity, radius, diameter, center, and periphery.

### Rearrange an Array to Put the Negative Elements Before the Positive Ones

Explore two ways to rearrange a numeric array so that its negative elements get before its positive ones and those equal to zero, keeping the relative order of the elements in the same sub-array.

### How to Check if a Line Segment Intersects a Rectangle?

Learn how to check if a line segment intersects with a rectangle.

### Isomorphic Trees

Learn how to check if two trees are isomorphic.

### The Centers of Unweighted Trees

Learn about the centers of unweighted trees.

### Shuffling an Array

Learn how to shuffle an array efficiently.

### The 3Sum Problem

Learn about two solutions to the integer 3Sum problem.

### Statistical Independence

Explore statistical independence or events and random variables.

### Linear Search With Fewer Comparisons

Explore an improved version of linear search.

### Finding the Digital Root

Explore two ways to calculate the digital root of an integer.

### How to Get Bold Math Symbols in Latex

Explore bolding math symbols in Latex.

### Parameters vs. Hyperparameters

Explore the difference between the parameters and hyperparameters in machine learning.

### Finding Neighbors of a Matrix Cell

Learn how to find neighbors of a cell in a 2D matrix.

### Referencing Subordinate Equations in LaTeX

Learn how to reference subordinate equations in LaTeX and customize their labels.

### Differences Between Definition, Declaration, and Initialization

Discuss declarations, definitions, and initialization in programming.

### How to Project a 3D Point onto a 2D Plane?

Learn how to project a point onto a plane and find its coordinates in the plane’s coordinate system.

### The Complexity of Shellsort

Explore Shellsort’s complexity.

### How to Check If a String Is a Palindrome?

Explore recursive and iterative algorithms for checking if a string is a palindrome.

### From Postfix Expressions to Expression Trees

Explore a linear-time algorithm for converting a postfix expression into an expression tree.

### Jump Search Algorithm

Learn about the Jump Search algorithm.

### Sampling From the Exponential Distribution

Learn about sampling from an exponential distribution.

### What’s a Hypothesis Space?

Learn about hypotheses spaces in machine learning.

### Converting Floats into Fractions

Explore four ways of converting a float into a fraction: two exact techniques and two approximate.

### How to Find Common Elements in Two Sorted Arrays

Explore two efficient ways of finding common elements of two sorted arrays.

### How to Calculate the Runtime Percentage Improvement

Learn how to compute the percentage improvement when the performance metric is time.

### Binary Search Trees vs. AVL Trees: the Complexity of Construction

Explore the construction complexities of Binary Search Trees (BSTs) and AVL trees.

### Pre-increment vs. Post-increment in a Loop

Explore the difference between the pre-increment and post-increment operators inside a loop’s termination condition.

### How to Find the Minimum Difference Between Elements in an Array

Learn how to find the closest two numbers in an array.

### Find the Kth Smallest Element in a Binary Search Tree

Learn how to find the k-th smallest element in a binary search tree.

### How to Find the Two Points With the Minimal Manhattan Distance

Learn how to find the closest two points in a two-dimensional space endowed with the Manhattan distance.

### Decision Trees vs. Random Forests

Explore the difference between decision trees and random forests.

### What is the Difference Between Artificial Intelligence, Machine Learning, Statistics, and Data Mining?

Learn about the differences between artificial intelligence, machine learning, statistics, and data mining.

### Difference Between the Cost, Loss, and the Objective Function

Explore the meanings of the loss, cost, and objective functions.

### Intuition Behind Kernels in Machine Learning

Discuss the role of kernels in machine learning intuitively.

### Information Gain in Machine Learning

Learn how to calculate the information gain in Data Science and Machine Learning.

### Is Selection Sort Stable?

Learn about the stability of Selection Sort.

### Number of Comparisons in Straight Selection Sort

Learn how to calculate the number of comparisons in Straight Selection Sort.

### Linearly Separable Data in Neural Networks

Learn about linear separability in Machine Learning.

### The Effects of The Depth and Number of Trees in a Random Forest

Explore a methodology for estimating how the depth and number of trees affect the performance of a random forest.

### How to Check String Periodicity

Explore three algorithms designed to check string periodicity.

### Binary Insertion Sort

Learn about Binary Insertion Sort algorithm and its complexity.

### Tabulation vs. Memoization

Explore tabulation and memoization.

### Tree Edit Distance

Learn about tree edit distance and how to calculate it.

### Context-Free Languages

Learn about context-free languages and some techniques for proving that a language is (not) context-free.

### Balanced Trees

Explore three types of balanced trees: the AVL trees, red-black trees, and weight-balanced trees.

### How to Sort Mostly Sorted Arrays

Compare the efficiency of four standard sorting algorithms: Bubble Sort, Insertion Sort, Quicksort, and Merge Sort.

### The Skip List Data Structure

Explore skip lists and operations of insertion, search, and deletion using the skip list data structure.

### Induced Subgraphs

Learn about induced and ordinary subgraphs.

### Weighted vs. Unweighted Graphs

Learn about the differences between the unweighted and weighted graphs.

### Rank of a Node in a Binary Search Tree

Explore three ways to determine a node’s rank in a binary search tree.

### Finding the In-Order Successor of a Node

Explore three ways to find the in-order successor of a node.

### From Lists to Forests

Explore two algorithms for building a forest of trees from a flat list.

### From Recursive to Iterative Functions

Learn about converting recursion into iteration.

### Streaming Median

Explore two algorithms for finding the median of a big data stream.

### Tail vs. Non-Tail Recursion

Explore the difference between the tail and non-tail recursion.

### The Akra-Bazzi Method

Explore the Akra-Bazzi method used to determine the complexity divide-and-conquer algorithms.

### Generating Permutations with Repetition

Explore two ways to generate all the permutations with repetition of the set.

### Bidirectional Search for Path Finding

Learn about two algorithms: Bidirectional Search (BiS) and Bidirectional UCS (BiUCS).

### How to Solve Constraint Satisfaction Problems

Learn about a general backtracking algorithm for solving constraint satisfaction problems.

### Expectimax Search Algorithm

Explore the Expectimax algorithm for stochastic games.

### Dijkstra vs. A* – Pathfinding

Explore differences between Dijkstra’s and A* algorithms.

### Depth-First Search vs. Breadth-First Search

Compare Depth-First Search (DFS) to Breadth-First Search (BFS).

### Graph Search vs. Tree-Like Search

Compare the Graph-Search and Tree-Like Search strategies.

### Uniform-Cost Search vs. Best-First Search

Explore Uniform-Cost Search (UCS) and Best-First Search (BeFS).

### The Informed Vs. Uninformed Search Algorithms

A comparison between informed and uninformed search strategies.

### Finding All Tic-Tac-Toe Winning Combinations

Learn how to find all the tic-tac-toe grids that represent a win.

### Tracing the Path in DFS, BFS, and Dijkstra’s Algorithm

Explore several ways to trace the paths in Depth-First Search, Breadth-First Search, and Dijkstra’s Algorithm.

### Iterative Deepening vs. Depth-First Search

Learn about the differences between Depth-First Search and Iterative Deepening.

### Complexity Analysis of QuickSelect

Analyze the worst, best, and average-case time complexity of QuickSelect.

### Candidate Elimination Algorithm

Learn about the Candidate Elimination Algorithm (CEA), which is a supervised technique for learning concepts from data