using System.Collections.Generic;
public static void Main()
bool[] array = new bool[4];
Console.WriteLine(array.Length);
int i = FindFreePlace(array, true, 3);
public static int FindFreePlace(bool[] places, bool isRotary, int neededPlaces)
int numberOfPlaces = places.Length;
List<bool> itemsList = places.ToList();
for (int index = 0; index < numberOfPlaces; index++)
places = itemsList.ToArray();
numberOfPlaces = places.Length;
for (int index = 0; index < numberOfPlaces; index++)
if(count == neededPlaces)
return index + 1 - neededPlaces;