app.UseSpa(spa =>
{
spa.Options.SourcePath = "wwwroot";
if (env.IsDevelopment())
{
spa.UseReactDevelopmentServer(npmScript: "start");
}
});
private static int SearchIndexOfDifferenceElement(List<int> _list)
{
int[] massive = new int[2];
foreach (var currentNumber in _list)
{
if (currentNumber != 1 && currentNumber != 0) break;
massive[currentNumber] += 1;
}
if (massive[0] > massive[1])
{
return _list.IndexOf(1);
}
else
{
return _list.IndexOf(0);
}
}
private static int SearchIndexOfDifferenceElement(List<int> _list)
{
int[] massive = new int[2];
foreach (var currentNumber in _list)
{
if (currentNumber != 1 && currentNumber != 0) break;
massive[currentNumber] += 1;
}
if (massive[0] > massive[1])
{
return _list.IndexOf(1);
}
else
{
return _list.IndexOf(0);
}
}