educative.io

Data structures for coding interviews in C# - issue

Hello,

int [] dashes = new int[5]{1, 2, 3};

This seems to be a wrong code, I get compiler exception CS0847 An array initializer of length ‘5’ is expected

Environment: VS 2019 and .Net Core 5.

Hey @Satya_Syam!
Thank you for pointing out the mistake. It has been fixed, and the changes are live now. We really appreciate learners who deep dive and ponder over the explanation.
We hope Educative has inspired you to further your learning. :slight_smile: