<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Java8 on Samarthya</title><link>https://samarthya.me/tags/java8/</link><description>Recent content in Java8 on Samarthya</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© Samarthya 2018-2026. All rights reserved.</copyright><lastBuildDate>Sat, 24 Apr 2021 05:43:46 +0000</lastBuildDate><atom:link href="https://samarthya.me/tags/java8/index.xml" rel="self" type="application/rss+xml"/><item><title>Smallest Integer</title><link>https://samarthya.me/posts/smallest-integer/</link><pubDate>Sat, 24 Apr 2021 05:43:46 +0000</pubDate><guid>https://samarthya.me/posts/smallest-integer/</guid><description>&lt;p&gt;Code available &lt;a href="https://github.com/samarthya/smallestinteger" target="_blank" rel="noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;The ask was to identify the smallest possible integer (&amp;gt; 0) in the array of integers.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Example&#10; &lt;div id="example" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#example" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;1. [-1,2] -&amp;gt; 1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;2. [-1,-2] -&amp;gt; 1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;3. [1,3] -&amp;gt; 2&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;I was initially thinking of using &lt;code&gt;sets&lt;/code&gt; and then finding out the missing one, but then reaized it is simpler and I do not need sets&lt;/p&gt;</description></item></channel></rss>