Learn it from developers who built it.
Tutorials, how-tos and deep dives on AI, .NET, C#, cloud and developer tools, written by the community.

Dynamic pricing allows businesses to adjust product prices in real time based on factors like demand, competition, and inventory levels. This article explains dynamic pricing, its benefits, and a basic C# implementation of a pricing algorithm.

C# can be utilized to develop efficient algorithms for flight scheduling and air traffic control, ensuring safe and timely aircraft movements in the increasingly complex world of aviation.

Data structures and algorithms are important, but it is not always easy to grasp their main ideas. This “I’m Preparing for FAANG“ series will help you not just learn data structures and algorithms but also dive into their philosophy. The final purpose of this series is to help you achieve your goal: To pass FANG interviews.

The LRUCache<TKey, TValue> class in C# provides a custom implementation of a Least Recently Used (LRU) cache. It optimizes memory usage by retaining a fixed number of items and evicting the least recently used ones when the cache exceeds capacity.

Learn what a Duck Number is and how to check for it in C#. Includes console programs to validate a number and list Duck Numbers in a range.

Explore the practical implementation of the Dining Philosophers algorithm in C# to understand resource allocation and synchronization in concurrent programming.

Discover how to effectively implement AES encryption in C# to secure sensitive data in real-world applications, enhancing data privacy and security.

Explore the development of a real-time traffic signal handling algorithm in C#, designed to dynamically adjust signal timings based on current traffic conditions to improve flow and reduce congestion.

To implement the Minimum Spanning Tree algorithm in C# to efficiently connect all nodes in a network, reducing costs and improving performance.

The problem involves sorting an array containing three distinct values, typically represented as 0s, 1s, and 2s, in a single pass.

This article delves into the Four Sum problem, a classic challenge in computer science and algorithm design. We explore various approaches to find all unique quadruplets in an array that sum to a given target.

Learn how to solve the 3SUM problem in C# using sorting and the two-pointer technique to find unique triplets that sum to zero.

The `BucketSort` class implements the bucket sort algorithm, which distributes elements into buckets, sorts them, and merges the sorted buckets. It's efficient for uniformly distributed data, with potential quadratic complexity in the worst case.

The Boyer-Moore Majority Vote Algorithm efficiently finds elements appearing more than a fraction of the time in linear time and constant space, using two candidates and counters to track occurrences.

This article explores the concept of caching, outlines the algorithm's mechanics, and provides step-by-step guidance on building an efficient LRU Cache using C# collections.

This article will discuss Get Products with O(n) Time Efficiency

The task involves creating a deep copy of a linked list where each node has a random pointer that may point to any node or null. Using a dictionary to map original nodes to their corresponding new nodes, the algorithm efficiently sets next and random pointers, achieving O(n) time and space complexity.

Arrays in computer science are static data structures that store elements in contiguous memory locations. They can be one-dimensional, two-dimensional, or jagged arrays. This article explores how to declare, manipulate, and use arrays in C#, along with algorithmic considerations like time complexity.

The "Longest Consecutive Sequence in Array" problem involves finding the longest sequence of consecutive integers in an unsorted array. This challenge can be efficiently solved using algorithms like hash sets or sorting methods to optimize time complexity.


The Sliding Window Technique is an efficient method for solving problems involving subarrays or substrings. It uses a "window" that slides across the data structure, allowing for dynamic adjustments in size.

In this article, we explore how to find all subsets of an array in C# using a bit manipulation technique. Each subset corresponds to a binary representation of an integer. By iterating through binary masks, we efficiently generate and print all possible subsets, demonstrating a powerful approach to subset generation.

The Union-Find algorithm, also known as the Disjoint Set algorithm, is a powerful tool for managing disjoint sets. It efficiently finds which set an element belongs to and can determine if a graph forms a cycle. It consists of two main operations: Find and Union.

Let's explore the fundamental concepts of priority queues and heap data structures in the context of C# programming. Readers will gain insights into the underlying principles of priority-based operations and their practical applications in solving a variety of programming problems.

Learn how to calculate and validate Verhoeff checksums in C# to detect data-entry errors, including adjacent digit transpositions.

An anagram of a string is another string that uses the same characters but in a different order. This article delves into solving anagrams using C#, exploring methods like sorting characters, frequency counting, and even employing the bubble sort algorithm.

Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted.

The Raft Consensus Algorithm ensures fault tolerance and consistency in distributed systems. It simplifies leader election, log replication, and commitment, offering benefits like simplicity, safety, liveness, and flexibility.

We’ll explore various rate limiting algorithms in the context of .NET Core, providing code snippets for implementing Token Bucket, Sliding Window, Fixed Window, and Concurrency limiters.

A Neural Network is an Artificial Intelligence (AI) methodology that attempts to mimic the behavior of the neurons in our brains. In this article, we’ll be building a basic framework for AI Neural Networks in C# and teach our program to perform basic X-OR operations.
Everything on Algorithms in C#, not only its articles: the Algorithms in C# page →
Write an article and earn +1,000 SHARP when it is approved.
Write an article