let today = new Beginning();


C# Rotate the square matrix

This is one of my questions from an interview. The interviewer asked me to rotate a square matrix in C#. While it is not so hard for me and I have done it in 10 minutes, I'd share my solution to all developers who may need this. namespace Test { class Program { static void Main(string[] args) { var a = new int[][] { new int[]  …

C# Algorithm Matrix Math

Get unique random numbers in C#

The source code this blog mentioned is here: The traditional methods for obtaining n non-repeating random numbers are: The random number is generated by the linear congruence method, and each random number is generated and compared in the database. If it already exists, the number is discarded. Randomly generate a linear sequence, and then  …

C# .NET Core Algorithm Random Numbers Unique random Non-repeat Random

  • 1