https://docs.microsoft.com/ko-kr/dotnet/api/system.linq.enumerable.distinct?view=netcore-3.1
์ฌ๊ธฐ์ 2-2๋ฒ์งธ๊บผ๋ฅผ ํด๋ดค๋๋ฐ ์ ์๋จ.
์๋๋ ์ฝ๋์.
mcs์ { 1, 0, 1, 5, 3 } ๊ฐ์ ๊ฐ์ง ํด๋์ค๋ค์ ๋ฃ์ด์ { 1, 0, 5, 3 } ์ด ๋ค์ด ์๋ ๋ฆฌ์คํธ๋ฅผ ์ป๊ณ ์ถ์.
์คํํ๋ฉด ์ด๋ ๊ฒ ๋์ด.
์ค๋ณต ์ ๊ฑฐ๊ฐ ์๋๊ฑฐ๊ฐ์๋ฐ, ๋ญ ์๋ชปํ๊ฑธ๊น ใ ใ
+ 2-1๋ฒ์งธ ๋ฐฉ๋ฒ์ผ๋ก ํ๋๋ฐ๋ ์๋จ
1๋ฒ ๋ฐฉ๋ฒ์ ๋น์ฐํ ๋๋๋ฐ, ์ํ๋ ๊ฑด ์ด๊ฒ ์๋๋๊น..
ย ย
// If Equals() returns true for a pair of objects // then GetHashCode() must return the same value for these objects. ์ด๊ฒ ๋ฌธ์ ๊ฐ์๋ฐ ๋๊ป ๋ค๋ฅธ ๊ฐ์ ๋ฐํํจ
GetHashCode() must return the same value for these objects. ์ด๊ฒ ๊ฐ ๊ฐ์ฒด์ ํด์์ฝ๋๋ ์ธ์ ํด๋ ๋์ผํ ๊ฐ์ด ๋์์ผ ํ๋ค๋ ๋ป์ด ์๋๋ผ, ๋ชจ๋ ๊ฐ์ฒด์ ํด์์ฝ๋๊ฐ ๊ฐ์์ผ ๋๋ค๋ ๋ป์ด์๋ค. ใณใณ ํด๊ฒฐํจ.