NiCE Interview Question

given an array list with songs shuffle them

Interview Answer

Anonymous

Jul 20, 2021

Random rng = new Random(); var shufflesongs = songs.OrderBy(o => rng.Next()).ToList(); Console.WriteLine("**********************After shuffle***********************************"); foreach (var song in shufflesongs) { Console.WriteLine(song); }