Category: algorithms
Algorithms like neural networks are stochastic. That means, that even when the same algorithm is trained on the same data it can give different results. The reason is, stochastic …
Assume a year has 365 days, what is the probability among 50 students, that at least two having the same birthday? Let’s consider this: what is the probability that …
I describe two solutions in C++ and C# to the LineSpace Algorithm and I tested using the following pseudo-code: const int N = 1000; // number of test samples …
You are given two strings s and t. String t is generated by random shuffling string s and then add one more letter at a random position. Return the …
Given N natural integers (from 1 to N), the number of all permutations is N! (Factorial). That is explained by the fact: There are N choices when selecting the …