<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: tandu-dev</title>
    <description>The latest articles on DEV Community by tandu-dev (@tandudev).</description>
    <link>https://dev.to/tandudev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F390869%2F350b2c23-6830-4836-8375-d2310977d1a6.jpg</url>
      <title>DEV Community: tandu-dev</title>
      <link>https://dev.to/tandudev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tandudev"/>
    <language>en</language>
    <item>
      <title>HackerRank Birthday Cake Candles challenge</title>
      <dc:creator>tandu-dev</dc:creator>
      <pubDate>Mon, 25 Jul 2022 18:35:48 +0000</pubDate>
      <link>https://dev.to/tandudev/hackerrank-birthday-cake-candles-challenge-6j5</link>
      <guid>https://dev.to/tandudev/hackerrank-birthday-cake-candles-challenge-6j5</guid>
      <description>&lt;p&gt;HackerRank has a &lt;a href="https://www.hackerrank.com/challenges/birthday-cake-candles/problem"&gt;challenge for calculating which birthday candles get blown out&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My C# solution looked particularly elegant to me, so I thought I'd show it here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static int birthdayCakeCandles(List&amp;lt;int&amp;gt; candles)
{
        var maxHeight = candles.Max();
        var numOfCandles = candles.Count(c =&amp;gt; c == maxHeight);
        return numOfCandles;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>csharp</category>
    </item>
  </channel>
</rss>
