This new method fixes the hands-seen-before check to be actually correct
Unsure how I got the correct answers with that being wrong. 🤷
19 lines
339 B
C#
19 lines
339 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace _2020
|
|
{
|
|
public static class Extensions
|
|
{
|
|
public static T PopFront<T>(this ICollection<T> list)
|
|
{
|
|
T val = list.First();
|
|
list.Remove(val);
|
|
return val;
|
|
}
|
|
}
|
|
}
|