Algorithm Archives - Code Maze https://code-maze.com/category/algorithm/ Learn. Code. Succeed. Tue, 28 May 2024 05:45:01 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.5 https://code-maze.com/wp-content/uploads/2020/01/Code-Maze-Favicon.png Algorithm Archives - Code Maze https://code-maze.com/category/algorithm/ 32 32 Fastest Ways to Perform Base 10 Conversions in C# https://code-maze.com/csharp-fastest-ways-to-perform-base-10-conversions/ https://code-maze.com/csharp-fastest-ways-to-perform-base-10-conversions/#respond Tue, 28 May 2024 05:45:01 +0000 https://code-maze.com/?p=116896 Performing base 10 conversions is fundamental when learning basic computer science and mathematical concepts. Since we know computer systems understand binary, such conversions can help us form different number representations that we can use for various applications such as encoding and cryptography. In this article, we will explore the fastest way to convert a base […]

The post Fastest Ways to Perform Base 10 Conversions in C# appeared first on Code Maze.

]]>
https://code-maze.com/csharp-fastest-ways-to-perform-base-10-conversions/feed/ 0
How Does the Default ASP.NET Core Identity Password Hasher Work? https://code-maze.com/aspnetcore-default-asp-net-core-identity-password-hasher/ https://code-maze.com/aspnetcore-default-asp-net-core-identity-password-hasher/#respond Fri, 24 May 2024 05:35:01 +0000 https://code-maze.com/?p=116868 In this article, we will delve into the default ASP.NET Core Identity Password Hasher. We will focus on understanding how it transforms plain text passwords into secure hashes and highlighting its security features. Let’s dive in. How the Password Hashing Process Works When discussing password hashing, we typically consider two scenarios. Firstly, when a user […]

The post How Does the Default ASP.NET Core Identity Password Hasher Work? appeared first on Code Maze.

]]>
https://code-maze.com/aspnetcore-default-asp-net-core-identity-password-hasher/feed/ 0
Fastest Way to Generate a Random Boolean in C# https://code-maze.com/csharp-fastest-way-to-generate-a-random-boolean/ https://code-maze.com/csharp-fastest-way-to-generate-a-random-boolean/#respond Wed, 13 Mar 2024 03:00:48 +0000 https://code-maze.com/?p=109796 Generating random boolean values is a common challenge in programming tasks, especially when randomness is required for gaming or testing data. With that said, let’s explore some methods to generate boolean values as quickly as possible. Random Generators In our previous discussion on the Random class in C#, covered in the article titled “Random Class […]

The post Fastest Way to Generate a Random Boolean in C# appeared first on Code Maze.

]]>
https://code-maze.com/csharp-fastest-way-to-generate-a-random-boolean/feed/ 0
How to Get the Number of Weekdays Between Two Dates in C# https://code-maze.com/csharp-find-number-of-weekdays-between-two-dates/ https://code-maze.com/csharp-find-number-of-weekdays-between-two-dates/#respond Wed, 21 Feb 2024 11:04:22 +0000 https://code-maze.com/?p=109617 Manipulating date and time values is a common programming problem in many applications. Have you ever wondered how we can calculate the number of weekdays between two dates? Knowing how to do this can be crucial in scheduling, project management, or resource allocation applications. In this article, we analyze some techniques we can use to […]

The post How to Get the Number of Weekdays Between Two Dates in C# appeared first on Code Maze.

]]>
https://code-maze.com/csharp-find-number-of-weekdays-between-two-dates/feed/ 0
Probabilistic Programming in C# With Infer.NET https://code-maze.com/csharp-machine-learning-probabilistic-programming-with-infer-net/ https://code-maze.com/csharp-machine-learning-probabilistic-programming-with-infer-net/#respond Sat, 03 Feb 2024 07:41:55 +0000 https://code-maze.com/?p=104133 With the increasing progress and interest in AI and Machine Learning, keeping track of and understanding the technologies behind powerful AI and ML systems is essential. One of these technologies is Probabilistic Programming. In this article, we will learn what it is and how it can be used in C# through the Infer.NET library. Let’s […]

The post Probabilistic Programming in C# With Infer.NET appeared first on Code Maze.

]]>
https://code-maze.com/csharp-machine-learning-probabilistic-programming-with-infer-net/feed/ 0
Permutations of a String in C# https://code-maze.com/csharp-permutations-string/ https://code-maze.com/csharp-permutations-string/#respond Wed, 21 Jun 2023 05:20:06 +0000 https://code-maze.com/?p=91677 In this article, we will learn how to create permutations of a string in C#. By permutating characters, we can generate different words from the same characters. So, let’s start. Permutations With Repetitions In our article about permutations, we discussed permutating elements without repetitions. We permutated elements like [1, 2, 3] into six possible arrangements […]

The post Permutations of a String in C# appeared first on Code Maze.

]]>
https://code-maze.com/csharp-permutations-string/feed/ 0
How to Generate Permutations in C# https://code-maze.com/csharp-generate-permutations/ https://code-maze.com/csharp-generate-permutations/#comments Wed, 24 May 2023 11:00:01 +0000 https://code-maze.com/?p=89989 In this article, we will examine the world of algorithms. Specifically, we will talk about an algorithm that we can use to generate permutations. Let’s start. Permutations Firstly, we need a definition for permutation, of which there are a few. Even Wikipedia’s definition is quite difficult to understand. Therefore, let us say that a permutation […]

The post How to Generate Permutations in C# appeared first on Code Maze.

]]>
https://code-maze.com/csharp-generate-permutations/feed/ 2
Heap Sort in C# https://code-maze.com/csharp-heap-sort/ https://code-maze.com/csharp-heap-sort/#respond Thu, 11 Aug 2022 06:00:52 +0000 https://code-maze.com/?p=73583 In this article, we’ll look at the heap sort algorithm in C#. We’ll discuss what the algorithm is, how it works, and see some code examples that demonstrate how to implement it. Finally, we’ll discuss its time and space complexity and compare the algorithm to other sorting algorithms, such as merge sort and quick sort.  […]

The post Heap Sort in C# appeared first on Code Maze.

]]>
https://code-maze.com/csharp-heap-sort/feed/ 0
Shell Sort in C# https://code-maze.com/shell-sort-csharp/ https://code-maze.com/shell-sort-csharp/#comments Tue, 05 Jul 2022 09:12:03 +0000 https://drafts.code-maze.com/?p=71922 Have you ever needed to sort a list of items, but didn’t want to use the built-in sorting function? If so, you may be interested in learning about Shell Sort, which is similar to insertion sort but uses a different approach to sorting. In this article, we’ll take a look at how shell sort works […]

The post Shell Sort in C# appeared first on Code Maze.

]]>
https://code-maze.com/shell-sort-csharp/feed/ 1
Counting Sort in C# https://code-maze.com/counting-sort-in-c/ https://code-maze.com/counting-sort-in-c/#respond Wed, 22 Jun 2022 05:00:51 +0000 https://drafts.code-maze.com/?p=71778 Have you ever needed to sort a list of items but didn’t want to use a built-in sorting algorithm? If so, you may have considered using the counting sort algorithm. In this article, we’ll take a look at how counting sort works and how we can implement it in C#. We’ll also compare it to […]

The post Counting Sort in C# appeared first on Code Maze.

]]>
https://code-maze.com/counting-sort-in-c/feed/ 0