---
title: "Comment by Mark Cooke on \"Fastest(?) way to find most frequent element of IEnumerable<int>\" | Hashnode"
description: "I would not take a job where they ask such questions. Because in a business, it&#39;s almost always better to go with the cleanest and most maintainable solutio"
url: "https://hashnode.com/posts/fastest-way-to-find-most-frequent-element-of-ienumerableint/641da033f4983a52bd4fd33b/comment/641e076e05c482464c90a5ea"
---

[Discussion](https://hashnode.com/posts/fastest-way-to-find-most-frequent-element-of-ienumerableint/641da033f4983a52bd4fd33b)

Comment [Fastest(?) way to find most frequent element of IEnumerable<int>](https://hashnode.com/posts/fastest-way-to-find-most-frequent-element-of-ienumerableint/641da033f4983a52bd4fd33b)

[Mark Cooke](https://hashnode.com/@NickelCoder)

[Mar 24, 2023](https://hashnode.com/posts/fastest-way-to-find-most-frequent-element-of-ienumerableint/641da033f4983a52bd4fd33b/comment/641e076e05c482464c90a5ea)

I would not take a job where they ask such questions. Because in a business, it's almost always better to go with the cleanest and most maintainable solution, not the most performant. If I had been asked this question, my first response would be "Why does this need to be performant?" Junior developers blindly write code without knowing why something needs to be done a certain way.

[Krystian Zakryś](https://hashnode.com/@krystianzakrys)

[Mar 24, 2023](https://hashnode.com/posts/fastest-way-to-find-most-frequent-element-of-ienumerableint/641da033f4983a52bd4fd33b/comment/641e076e05c482464c90a5ea#reply-641e094e05c482464c90a628)

Theres always pros and cons to take into consideration. Especially with large systems linked to the financial sector ;) That's why I checked how data variety changes finding times. This was a semi-cool experiment I think :)
